Conditional Comments Question

anna

New Member
Hi all,

I'm trying to implement a conditional comment to direct people using IE6 to a special style sheet. I can't get it to work. Am I doing this right? I've placed it in the head section, under the regular style sheet. Here's what the code looks like:

<link href="../../../Styles/oneColLiqCtr.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="ie6TestStylesheet.css" />
<![endif]-->

And here's a screen shot to see the code in action.

ss01.jpg

Thanks for any suggestions.
 

PixelPusher

Super Moderator
Staff member
Anna if you are creating a stylesheet for IE6 users why not target IE6 in your conditional statement? Like this:

HTML:
<!--[if IE 6]>
   IE6 stuff...
<![endif]-->

Your syntax looks correct though, not sure why that would not work...
 
Last edited:

anna

New Member
Hi Pixel,

Originally I did just that. I set up the syntax to read [if IE 6] but couldn't get that to work so then I tried [if lt IE 7] but that didn't work either.

Stumped...
 

bcee

New Member
A stupid question but do you have the IE6 specific document in your CSS folder?

<link rel="stylesheet" type="text/css" href="ie6TestStylesheet.css" />

Doesn't look like your others that are deep. Try:

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="../../../Styles/ie6TestStylesheet.css" />
<![endif]-->

If that doesn't work my next guess would be the Dreamweaver template comments interfering with IE's parsing system.
 

anna

New Member
Ohhh, you might be just right on that observation. Thank you! Let me try that and get back with you. Thanks!! :eek:
 

anna

New Member
Brad, you've worked wonders on my psyche this morning as that totally worked.

I committed the ultimate work foul yesterday when I got sick at my desk so I don't think I was thinking too clearly at that point.

Feeling much better now (especially now) so let me take you out for a beer! :D

Thank you.
 

PixelPusher

Super Moderator
Staff member
I saw your file paths were different but just figured it you were testing the style sheet (to then move it with the others when ready)...

sometimes it is just the simplest of things lol.
 

anna

New Member
Yeah, and sometimes photographers masquerading as web designers is much more trouble than it's worth...
 
Top