Target IE6, IE7, and IE8 with only 4 characters (hack).


 / Published in: CSS
 

See the source above for a quick explanation. And don't ask me to explain why \9 works for IE8...but it does.

Use these with caution.

  1. body {
  2. color: red; /* all browsers, of course */
  3. color : green\9; /* IE8 and below */
  4. *color : yellow; /* IE7 and below */
  5. _color : orange; /* IE6 */
  6. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: maunnes on June 26, 2010

pretty cool!

Posted By: polly42 on August 27, 2010

Didn't know about the \9 one, thanks!

You need to login to post a comment.