Solved

Conditional Statement for Internet Explorer?

Posted on 2013-06-07
4
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
Several part series to implement Internet Explorer 11 Enterprise Mode
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
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…

627 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