The End of the IE Hack?

October 25, 2006

I ran across this list on the IEBlog while searching for...ahem, cough, uh, a hack. Microsoft offers this "list of common CSS hacks" and says these are the bugs they're ridding the world of in IE7 and that will soon break any pages you've used them on.

  • html > body -
  • * html -
  • head:first-child + body -
  • head + body -
  • body > element -

This was not the best news I've ever read. Like most coders, I prefer my CSS clean and I enjoy the intellectual challenge of writing code that functions smoothly on the pure power of CSS, alone. Yet once in a while even the most stubborn of us have to admit that a hack is the only solution. When that button just will not align in IE6 the way it's supposed to and you've tried everything under the sun, well, hack away, I say. This is the real world, and if things don't work, you get fired out here. So, now what am I going to do to fix things in IE6?

Fortunately, there's a glimmer of hope—and that glimmer is called MS ineptitude. Excuse my disbelief, but I think someone may be fooling themselves. Microsoft claims they're going to eliminate all these bugs? Microsoft? Oh, yeah. And pigs can fly. I've been testing pages in IE7 RC1 for a few months now, and as far as I can tell, some of these hacks still work the way they always have.

Microsoft says it will begin "delivering" IE7 through automatic updates on November 1st. So if you're like me and have ever used one or more of these hacks, keep a close eye on pages that use them. But personally, I don't think there's any reason to panic and stay up nights reworking old sites. Remember, Microsoft also once said, "This antitrust thing will blow over."