Saturday 2 June 2012

CSS hack for IE8 Standards Mode


IE8 Standards-Mode Only:
.test { color /*\**/: blue\9 }
All IE versions, including IE8 Standards Mode:
.test { color: blue\9 }
You should probably use conditional comments instead, but sometimes a good old-fashioned CSS hack can get you out of a bind (especially when you don’t want to have to grab another external stylesheet).
The hacks should be cascaded like this for best results:
.test
color: green;
.test
color /*\**/: red\9
.test
*color: blue;
_color: pink;

No comments:

Post a Comment