IE 8 and Version Targeting

Will IE 8 recognize IE 7 conditional comments when set to render in IE 7 standards mode? The answer is no.

The Question

The test box below should be 100px x 100px with a blue background in all browsers except for IE 7. In IE 7, the box should be 200px x 100px with a red background. What I'm curious to know is if IE 8, set to render in IE 7's standards mode via the following meta declaration <meta http-equiv="X-UA-Compatible" content="IE=7" />, will recognize IE 7 conditional comments. My assumption (and my hope!) is that IE 8 will.

The Test

 

The Result

While I'm not technically sure if this is a feature or a bug, given my assumption, I have to say that IE 8 Beta 1 (8.0.6001.17184) running on Windows Vista Home Premium Service Pack 1 fails the test. When IE 8 is running as IE 8, the box is blue, regardless of the version targeted. When IE 8 is emulating IE 7*, the box is red, regardless of the version targeted. In my opinion, this is not intuitive and will lead to more sites being "broken," since IE 7 conditional stylesheets will not get served to IE 8 even if IE 7 is targeted.

Last update—28 March 2008

* I'm also not sure if the emulate IE 7 functionality
(The "Emulate IE7" button activated in IE 8) will be part of the gold release.

barKode logo

Upcoming events

Recent Blog Posts

View all posts by Jeffrey

Feeds
Want to work with us yet? We’re ready when you are.