Thanks to the way older versions of Internet Explorer browsers render particular HTML elements, often it’s not possible to supply the same CSS stylesheet to every browser.
Thankfully, Internet Explorer supports conditional comments, and is the only browser to do so, which allows us to specify special CSS stylesheets for different versions of Internet Explorer, from version 5 upwards.

Conditional comments are structured in the same way as HTML comments, meaning browsers other than Internet Explorer will just treat them as comments, while IE has special code which looks for the conditions’ syntax within comments. They can only be placed in HTML files and are written in the format:
<!--[if expression]> HTML <![endif]-->
One thing to watch out for as a Web Developer is windowed elements. Even if the website you create looks as though it works perfectly fine in older browsers, you may have missed checking the placement of windowed elements.
What are windowed elements?
In versions 6 and below of Internet Explorer, some of the HTML components used are ‘borrowed’ from standard windows components, and as a result they are drawn differently. Microsoft decided to call these elements ‘windowed’ elements, which a cynic would say hides a bug as a ‘feature’. Happily, Internet Explorer 7 onwards does not contain any windowed elements.

Click to continue reading “Windowed and Windowless Elements”
This week’s top tech tool is ‘Multiple IE’ by TredoSoft, which allows you to use multiple instances of different versions of Internet Explorer on a single Windows PC - which is especially helpful for those of us who have to create an IE 6 and 7 compatible website and only have one computer.
The tool allows you to install instances all the way back to Internet Explorer 3, although we wouldn’t recommend trying to make your website HTML compatible that far back!
It’s not the perfect tool - sometimes it renders things slightly wrong, sometimes it crashes and sadly this tool doesn’t currently work on Windows Vista, but it is as close as you can get without multiple machines with multiple software configurations, or a Virtual Machine set-up.



Recent Comments