Solved

Conditional Statement for Internet Explorer?

Posted on 2013-06-07
4
308 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It's here again; Microsoft is launching a new version of Internet Explorer: Internet Explorer 9, with noticeable changes on its interface, functions and new tools. As they say on its promotional video: "It's time to play, on a more beautiful web", f…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
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 +…

861 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