Solved

Conditional Statement for Internet Explorer?

Posted on 2013-06-07
4
303 Views
Last Modified: 2013-06-24
I've got two different div,  A and B.

I want A to parse for non-IE browsers and B for IE 7+

I'm putting this in a block. Should I use conditional comment for IE? or is there another approach? What would be the code?

A)  <div style="position: absolute; bottom: 510px; height 1px; width: 960px; margin-left: -16px; margin-right: 0px; border: 1px solid #f1f1f1;"></div>

B)  <div style="position: absolute; bottom: 210px; height 1px; width: 960px; margin-left: -16px; margin-right: 0px; border: 1px solid #f1f1f1;"></div>
0
Comment
Question by:sandshakimi
  • 2
4 Comments
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
You should put all the CSS for IE7 in a separate style sheet and refer to it in the head tags?
You would use this, if your CSS file was called ie7.css:
drupal_add_css(path_to_theme() . '/css/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
 It goes on the template.php file, where you will probably see other lines like this

What theme are you using? Have you made it a custom theme so that if the original theme had an update, you wouldn't overwrite this line and lose it?
0
 

Author Comment

by:sandshakimi
Comment Utility
Using the  OpenPublic distro, Omega theme.

Which file to put the code in?
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
Drupal 7? I will download it and look.
0
 
LVL 12

Accepted Solution

by:
junipllc earned 500 total points
Comment Utility
With Omega you should use something along the lines found in this issue:

https://drupal.org/node/1263750#comment-7203972

Omega is great with this stuff -- takes a lot of work out of dealing with it, but unfortunately the documentation is still a bit scarce.

Best,

Mike
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now