Goodbye Internet Explorer Hacks (well maybe)
I had to do a template today and I took the opportunity to code using no hacks. With the impending launch of Internet Explorer 7 there are going to be many sites that won't render properly because of existing Internet Explorer hacks.
Back in October Microsoft issued a call to action to developers to stop using IE specific hacks. This might seem a little galling especially when every developer spends more time trying to get IE to display things correctly. But they have a very good point. With the release of IE7 the following hacks won’t work:
- html > body
-
- html
- head:first-child + body
- head + body
- body > element
With IE7 Microsoft are trying to clean up their act so I think it is fair that developers should clean up their acts too. I code for IE5 up and managed to complete the templates to XHTML and CSS compliance with one stylesheet and no hacks. OK it took me a bit longer but the code is future proofed. Another bonus is that it makes maintaining the site so much easier as you don’t have to go through 5 or 6 stylesheets. This is all well and good until the next tear your hair out moment in IE but my intention from now on is to say goodbye to IE hacks! Famous last words….
Tags
Can you help make this article better? You can edit it here and send me a pull request.
See Also
-
Better coding with Fangs
Until today I wasn't aware of the Fangs plugin for Firefox. Whilst reading an article on evaluating accessibility over at 456 Berea Street I came across the plugin. -
Websites on mobile phones
With mobile access to the web becoming more prolific it may well be the time for businesses to ensure that their online presence covers delivery over mobile platforms. The good news is that if the site is build using modern methods it is relatively easy and cheap to do. -
Internet Explorer 7
I've been testing out the new Internet Explorer 7 Beta for a while now and I must say that most if not all of it is very good. For a start the security is much better but as a designer I can't get over the quality of the rendering. It is near Mac like in quality.