PDA

View Full Version : transparent png not working in IE 6



blackdragon13
09-27-2007, 04:51 PM
I created a png logo with a transparent background to use on my company's website. It looks great in Firefox, but in IE6 it shows up with a light grey box around it.

This is my first attempt at using a transparent background for a web graphic, so I have no idea why this is happening. Did I probably do something wrong in creating my png image, or does IE6 not support transparent backgrounds on these files? If anyone knows the answer, please let me know.

Thanks in advance to anyone who can help.

Mr Moo
09-28-2007, 07:45 AM
IE6 does not support 32-bit transparent PNGs without some hacking. There are 2 recent posts on my blog which have some detail about this, but basically it comes down to using the AlphaImageLoader (http://msdn2.microsoft.com/en-us/library/ms532969.aspx) filter to load the images.

blackdragon13
10-01-2007, 04:30 PM
Thanks Mr Moo - Unfortunately, this does appear to be the only solution.

I didn't realize what a problem it would be to just throw a transparent PNG logo into the top corner of a page. It looked nice, but this just isn't worth it. After reading everything I could about the AlphaImageLoader, it turns out that putting the image into the filter makes it work for IE 5.5+, but then every other browser can't read it and the image doesn't display.

The end result is that to make it work everywhere (actually just ALMOST everywhere), I have to use a whole mess of javascript to detect the browser and some more code is needed for other things. Here is a link to an article explaining all of this:

http://www.alistapart.com/articles/pngopacity

For anyone reading this, I would avoid using transparent PNG's if it is just for a simple, unnecessary effect. Don't bother going through all of this unless it is really important to your design. For a transparent logo that was supposed to display over about 1 inch of content, I just don't think it's worth it.

AmenKa
10-13-2007, 04:27 AM
uuuuh... i didnt look at the post date, but if your company website is being viewed by anyone except those with REALLY old comps, ms should have forced them to install IE7 by now.. I use FX myself, but I am also curious as to why you used a transparent background for an image that doesnt sound like it overlays anything, and could be given the pages background quiet easily.