Friday, October 14th, 2005

Microsoft call to action: The demise of CSS hacks and broken pages

Category: IE

Microsoft call to action: The demise of CSS hacks and broken pages

The IE 7 team is seeing issues with their new browser, and announced a call to action on our IE hacks.

Since developers need so many work arounds due to the IE box model breaking, and weird things, we have hacks galore.

However, a lot of these hacks are not future proof, and with IE 7 fixing some of them, sites get broken there.

The IE team wants us to use conditional comments to help out:

<!--[if IE]>

#footer .search {
	margin-top: -1.6em;


An example that spurred this on was viewing the new Slashdot markup

Posted by Dion Almaer at 4:48 am

2.6 rating from 9 votes


Comments feed

I, for one, don’t like the non-standard conditional comments littering my html with style mark-up. If the IE7 team intend to stop the IE hacks from working, they’d better make a half-decent browser that doesn’t choke on good code like IE6 does.

Comment by Paul D — October 14, 2005

I agree with Paul. In addition, using (good) CSS hacks lets you keep the work-around right next to the rule you’re working around, which is a boon maintainability-wise.

Comment by Edward O'Connor — October 14, 2005

Another agreement with Paul here. All the noise around that post on the IE blog really bugs me. I just don’t think CSS hacks were the right solution in the first place.

And now we’ve got IE basically saying “we forced you to wear your right shoe on your left foot, but good news! you can switch it back now!” Gee, thanks.

Oh well, moving forward….

Comment by Patrick Ryan — October 14, 2005

“Conditional comments”?

“We don’t like the old hacks we forced you to use, so now you have to add this evil one we just invented!” As Patrick said: Gee, thanks.

Comment by Chris Purcell — October 14, 2005

I think all those posting negative comments are missing Microsoft’s intentions here.

The conditional comments — which, though non-standard, do NOT break standards compliance — allow you to retain your hacks for IE6, so that they CAN make IE7 behave as it should, according to the specs. Microsoft is acknowledging that they screwed up in IE6 and are trying to fix it now, but the reality is that to correct the behavior, backwards compatibility cannot be maintained where these workarounds exist. They’re coming forward and showing us to let sites work in both IE6 and IE7.

In the past, too many people made these same complaints, and that’s why the broken behavior of IE5 stayed around in IE5.5 and IE6 — nobody wanted to make wide-sweeping changes when compatibility had to be broken, so they left it broken. Now they’re finally realizing that standards-compliance is worth the pain.

We really should be giving them credit in this rare case — the easy answer would have been to tell everyone to instruct their clients to upgrade to IE7 or live with the breakage. The old Microsoft would have said just that.

Comment by Keith — October 14, 2005

No doubt….MS’s lack of support for the W3C standard got us into this “hacking workaround” in the first place.

I say, let the old hacks break. People shouldn’t rely on those to fix them, and “unfixing” a hack is even worse.

I’d be surprised if IE7 does what they claim, at least for CSS2.1, I’m sure by the time it’s realeased, Safari, Opera, FireFox, et. al will already be supporting CSS 3.0 while we have to hack around IE7 again.

My 2 cents.

Comment by Anthony Ettinger — October 14, 2005

ps – conditional logic on the front end is a bad idea©

Comment by Anthony Ettinger — October 14, 2005

Leave a comment

You must be logged in to post a comment.