Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditional Statement for Internet Explorer?

Posted on 2013-06-07
4
Medium Priority
?
326 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
ID: 39228536
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
ID: 39228700
Using the  OpenPublic distro, Omega theme.

Which file to put the code in?
0
 
LVL 17

Expert Comment

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

Accepted Solution

by:
junipllc earned 1500 total points
ID: 39229284
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Following on from our article on "The Murky World of Consent and opt in", we thought we would issue some helpful guidance, not only on consent itself but knowing what information you are capturing, what you are doing with this data and how you can p…
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

927 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