Conditional CSS for FF, IE7, IE6

/ Published in: CSS
Save to your folder(s)

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.

Copy this code and paste it in your HTML
  1. .sample {
  2. height: 15px;
  3. #height: 15px;
  4. _height: 21px;


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.