Problem getting CSS Conditional Comments functioning

Hi all, I’m having some throuble getting IE6 and below working nice with a design I’m working on. What I’ve got is two div fields for the menu and main content with a transparant png so the background image from the background div shows through. Because of the issue around png’s on IE6 and below, I would like to have just a black background on both the menu and content divs in IE6 and below

I am using the conditional comment:

<!--[if lte IE 6]>
	<link href="css/ie6-and-down.css" rel="stylesheet" type="text/css" media="all" <![endif]--> 

Which is sitting at the very bottom of the head of my document.

Now when I test in IE7+ and Firefox eveything looks good but in IE6 there is still the grey box issue - it is only when I remove the original css file (for IE7+, Moz, etc) that everything looks ok

I’ve included a test html and both css files as a zip if anybody wants to take a look. I need to sort this out as my client uses IE6 and no amount of presuasion by me will change that fact

Thanks in advance,
Kerry

Instead of aggravating yourself with that why not use the IE 6 PNG fix, works great:

http://www.twinhelix.com/css/iepngfix/

Oh and anything under IE 6? forget about them, they are deader than doornails

Just a quick reminder: did you use the star html hack for testing. If so, don’t forget to write the IE css without * html in the condcom :slight_smile:

Edit:

oops, i missed the png part of your post … indeed the png fix might be a better way if you want png in IE6

Hi, as dc_dalton has alluded to IE6 doesn’t have support for PNG-24 images with transparency as as a result the transparency isn’t shown. He linked you to a great PNG fix which is probably one of the better ones out there considering it has support for background-position in there :slight_smile:

Thanks, I will try that png fix. I did try another older png hack which had issues with background:repeat; and so you had to scale your image which was going to cause major issues.

I would so just love to forget IE6 but my client uses it, I explained how much of a piece of sh*t it is and that we would have signed off by now if he didn’t insist on IE6 compatibility, I suppose it is his money after all. In his defense it is still used by around 10 to 16% of users nationally (depending on who’s stats you go by).

Thanks dc dalton, that did the trick, becuase of how it implements I’ve had to tweek a few bits and pieces , but less of a headache than having to mess around with browser specific css files