Posted By

Winkyboy on 01/14/08


Tagged

css conditional browser-based


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

jonhenshaw
vilebender
stoker
snucko
rd3k
JimiJay
m4tik
kwameboame
firstpass
khommon


Conditional CSS for FF, IE7, IE6


 / Published in: CSS
 

URL: http://www.cmsproducer.com/different-css--firefox-internet-explorer-7-IE-6-5

Set different values for an element based on browser (specifically, how the browser interprets the CSS). Definitions must be in order as shown below because newer definitions override existing.

The first setting will apply to all browsers. The second setting (using a pound symbol, #) will only apply to Microsoft Internet Explorer. The third setting (an underscore, _ ) will only apply to IE browsers 6.0 and older.

  1. .sample {
  2. height: 15px;
  3. #height: 15px;
  4. _height: 21px;

Report this snippet  

You need to login to post a comment.