Posted By

Nettuts on 06/25/10


Tagged

css ie hacks


Versions (?)

Who likes this?

23 people have marked this snippet as a favorite

d55beck
Orlandoo
vagrantradio
maxvee8
polly42
maltem
akurtula
aelien
wdeer
barbietunnie
clementcollier
gisu
obear
petemcbride
alesma
fomigo
ljayz
qubestream
adamcbrewer
leobetosouza
o0110o
Priestd09
atulkransingh


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.