Take the 2-minute tour ×

This is driving me nuts. I'm trying to use a conditional IE6 stylesheet. I posted this test page here. Here is the code I placed in my head tags:

<!--[if IE 6]>

The ie6.css should set the body background to red when viewed in IE6.

What's wrong here? I'm sure it's something dumb. Could someone please point it out to me?

share|improve this question
Works here, it looks fine... If you're having the problem on different page then the one you've shown, check if you have right path there :) –  Adam Kiss Feb 7 '10 at 0:09
Why isn't it not working? :p –  womp Feb 7 '10 at 0:09
Works fine for me. –  Pekka 웃 Feb 7 '10 at 0:10
@womp - you got me there with double negative. –  Adam Kiss Feb 7 '10 at 0:15
Why are people surprised it works? The poster himself states that it working? –  Dan Diplo Feb 7 '10 at 0:47
show 1 more comment

4 Answers

It works fine for me. Run your test page through IE NetRenderer and you'll see the red background. Perhaps you're testing it in a version of IE other than 6?

share|improve this answer
+1 for pointing out other version then IE6 :D –  Adam Kiss Feb 7 '10 at 0:06
add comment

You don't happen to be trying this using IETester?

Because with IETester, Conditional Comments will always resolve to the highest installed version of IE.

share|improve this answer
I see it even in IETester. –  Adam Kiss Feb 7 '10 at 0:08
True. Must have been a phenomenon in an older version. –  Pekka 웃 Feb 7 '10 at 0:10
add comment

is the CSS file in the root folder (same folder as the HTML) ? it's good practice to put your CSS in a separate folder.

<!--[if IE 6]><link href="css/ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
share|improve this answer
add comment

I just had a similiar issue. The conditional comments did not work correctly and I tried everything. The issue was that I had an X UA compatible meta tag in the header which obviuously influences the rendering. So keep watching out for that because that can be a reason.

share|improve this answer
add comment

Your Answer


