March 28, 2008 - 6 comments

IE 8, version targeting, and conditional comments

As promised at last night's NY Web Standards meetup, this morning I tested to see if IE 8 would recognize IE 7 conditional comments when set to render in IE 7 standards mode. The unfortunate answer is no. You can review the test here: http://themechanism.com/barkode/demos-tutorials/ie8-version-targeting.php

Aside—I installed Safari 3.1 (525.13) on my PC (Windows Vista Home Premium Service Pack 1) this morning and, for the first time in months, it runs!

Published by: jeffreybarke in The Programming Mechanism

Comments

Adam Detrick
March 28, 2008 at 1:45 pm

First of all, congrats on getting Safari to work again – you can now enjoy beautiful font rendering on the PC again!

As for IE8 not recognizing IE7 conditional comments when it’s emulating 7, this is pretty bad news. Very bad news.

As I mentioned last night, I work around IE problems by using the conditional comment created DIVs (div id=’ie7′) to target special CSS rules to IE without using hacks or an extra http request. The fact that IE8 will not pick this up properly when I version target IE7 makes the meta switch useless to me. It’s actually like adding a fourth browser to support (ie6, ie7 with CC’s, emulated ie7 without CC’s, and ie8). For this reason, I’m kind of glad that the browser will be set to render in IE8 mode by default (until they change their mind again).

It’s hard to imagine going back to the messy CSS hacks of yesteryear when so much attention is focused on the forward-thinking progress of IE8.

Thanks again for hosting a great meetup – I’ll be sure to leave some good feedback on meetup.com. Looking forward to the next one!

Comments are closed.

Adam Detrick
March 28, 2008 at 1:45 pm

First of all, congrats on getting Safari to work again – you can now enjoy beautiful font rendering on the PC again!

As for IE8 not recognizing IE7 conditional comments when it’s emulating 7, this is pretty bad news. Very bad news.

As I mentioned last night, I work around IE problems by using the conditional comment created DIVs (div id=’ie7′) to target special CSS rules to IE without using hacks or an extra http request. The fact that IE8 will not pick this up properly when I version target IE7 makes the meta switch useless to me. It’s actually like adding a fourth browser to support (ie6, ie7 with CC’s, emulated ie7 without CC’s, and ie8). For this reason, I’m kind of glad that the browser will be set to render in IE8 mode by default (until they change their mind again).

It’s hard to imagine going back to the messy CSS hacks of yesteryear when so much attention is focused on the forward-thinking progress of IE8.

Thanks again for hosting a great meetup – I’ll be sure to leave some good feedback on meetup.com. Looking forward to the next one!

Comments are closed.

Jeffrey Barke
April 10, 2008 at 11:07 am

Thanks for the kind words, Adam.

It's definitely a pain that IE 8 will not recognize IE 7 conditional comments when it's emulating IE 7, but I don't think all is lost.

It's not optimal, but to secure your current websites, you can target IE 7 and change your conditional comments from [if IE 7] to [if (IE 7)|(IE 8)] and everything should work fine.

Comments are closed.

Jeffrey Barke
April 10, 2008 at 11:07 am

Thanks for the kind words, Adam.

It's definitely a pain that IE 8 will not recognize IE 7 conditional comments when it's emulating IE 7, but I don't think all is lost.

It's not optimal, but to secure your current websites, you can target IE 7 and change your conditional comments from [if IE 7] to [if (IE 7)|(IE 8)] and everything should work fine.

Comments are closed.

Paul
March 6, 2009 at 9:27 am

As of Release Candidate 1 IE 8 _does_ include any IE7 conditional comments when running in compatibility mode.

Comments are closed.

Paul
March 6, 2009 at 9:27 am

As of Release Candidate 1 IE 8 _does_ include any IE7 conditional comments when running in compatibility mode.

Comments are closed.