Browsing articles from "June, 2009"
Jun
18

IE Conditional comments appear in the body

By Sam  //  IE Problems  //  No Comments

Using conditional comments to target the various Internet Explorer versions can be a great help but even they have their own bugs.

Recently, a conditional comment I was using to specify an IE specific stylesheet started coming out in the body of the page. The code was in the header but somehow the comment was being printed out on the page.

It all came down to a missing space in the comment. I was using:

<!--[if lte IE7]><link rel="......./><[endif]-->

When I should have been using:

<!--[if lte IE 7]><link rel="......./><[endif]-->

(note the space between IE and 7).

Sponsored links