About a year ago now IE Blog made a “Call to Action” regarding the demise of popular CSS hacks which is now causing broken pages in IE7.  They basically said that people needed to remove all the common CSS hacks that they used in order to get some things formatted in Internet Explorer.

Hacks such as:

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

Or even those that worked inside of the element definition like;

  • _{property}:value

Which was actually ignored by all other browsers but Internet Explorer.

The issue is, most of these hacks have been fixed in IE7 and thus that specific IE formatting will not be applied in 7.  Which is great if the rendering quirk your hack was designed to get around had been fixed.  

The issue I’m having is that I am still seeing quite a lot of CSS tom-foolery in IE7.  Things don’t render 100% the way they should, sure its leaps and bounds better than previous flavors of IE, and I’m glad that they are finally getting around to actually listening to a spec, but still.. stuff doesn’t always work 100% the way it should and that is why those hacks were handy. 

MS didn’t seem to care about most customer complains with regards to the way CSS was implemented in previous versions of IE, and developers got used to dealing with it in a certain way, now they want us to abandon those ways too.  They have taken away the one nice way we could “fix” stuff in the CSS file.  Instead they want us to use the conditional comments crap.. which I personally don’t like and forces you to have multiple files for inclusion or forces you to have completely seperate style blocks.

The thing is, NOW because IE7 wont play nice you have to not only remove your hacks for all flavors of IE, but you also have to divide up all former versions of IE into their own files;

< !--[if lte IE 7 ] > .. Load the IE7 file .. < ![endif]-- >
< !--[if lte IE 6 ] > .. Load the IE6 file .. < ![endif]-- >
< !--[if lte IE 5.5 ] > .. Load the IE5.5 file .. < ![endif]-->

This sucks.  I want a CSS solution – and I’m going to hold my breath until I get one!

Okay maybe not.. But a CSS solution would be nice..