CSS hack for IE8 Standards Mode

Well, someone had to find one eventually…:-)

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:

color: green;

color /*\**/: red\9

*color: blue;
_color: pink;


Posted on September 29, 2009, in Web Dev and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: