PNG IE6 Fallback Background Colour

Associate
Joined
16 Jul 2008
Posts
271
Location
London
Hi,

Have a PNG transparency on my home page and I just want a fallback background colour if the user is using IE6, currently IE6 will display a grey background colour for PNG's.

Not interested in using JavaScript or filters to fix the transparency, I know I could use a specific IE6 condition statement to overide the style all together, i just wondered if there another way to make IE6 display a specific background colour for PNGs without using conditional statement?

Thanks any help appreciated
 
Not possible, AFAIK.

IE6 specific stylesheet is a decent option and doesn't take much work.

1. Just use Gimp / Photoshop to add a bottom layer filled with your desired colour.

2. Save it as a alternate image to be served up to IE6 only. ( jpg / gif / png8 )

3. Everybody wins.
 
Or you could get them to display as intended using a conditional statement and a small script such as DD_belatedPNG. If you have to support IE6 you may as well do it properly. I would also like to balance this post with IE6 does suck - badly! The sooner it dies the sooner the universe will be happy.
 
Someone should add that it is bad practise to put conditional styles in with your normal CSS.

You really should use a conditional statement and feed IE6 it's own style sheet.
 
Back
Top Bottom