CSS hack for IE8 Standards Mode
Wednesday, 11. March 2009, 21:01:48
Well, someone had to find one eventually...:-)
IE8 Standards-Mode Only:
All IE versions, including IE8 Standards Mode:
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).
edit: Hmm, paul.irish in the comments mentions that this also affects IE7. I could have sworn I tested it in IE7...anyway, keep that in mind if you use it. I'll try to figure out what's up.
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).
edit: Hmm, paul.irish in the comments mentions that this also affects IE7. I could have sworn I tested it in IE7...anyway, keep that in mind if you use it. I'll try to figure out what's up.













