Link to home
Start Free TrialLog in
Avatar of sandshakimi
sandshakimiFlag for United States of America

asked on

Conditional Statement for Internet Explorer?

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>
Avatar of nanharbison
nanharbison
Flag of United States of America image

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?
Avatar of sandshakimi

ASKER

Using the  OpenPublic distro, Omega theme.

Which file to put the code in?
Drupal 7? I will download it and look.
ASKER CERTIFIED SOLUTION
Avatar of junipllc
junipllc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial