Mike Eng
Mike Eng

Reputation: 1681

if IE conditional comments not working

It seems like a silly question, but I'm stumped.

I'm using an if IE conditional statement to fix some issues in IE6.

In the head, I have

<!--[if lt IE 7] > <script type="text/javascript" src="js/ie6.js"></script> < ![endif]-->

And in the ie6.js file, I have a simple alert, which works when I take it out of the conditional comment. But in IE, the alert does not show. I am testing on IE 6.0.2900 on Windows XP in Parallels Desktop.

Upvotes: 2

Views: 4378

Answers (1)

Sjoerd
Sjoerd

Reputation: 75609

Try it without spaces in the tags:

<!--[if lt IE 7]>
According to the conditional comment this is Internet Explorer lower than 7
<![endif]-->

Upvotes: 7

Related Questions