Page is a not externally linkable
- Code, Content, and Presentation
-- HTML
---- PNG Transparency Problems in IE


Robin_reala - 6:56 pm on Aug 15, 2006 (gmt 0)


I've never had any problems in IE with transparent 8 bit PNGs (where the transparency is a palette entry). It's true though that under normal circumstances IEs version 6 and under on Windows don't support 32 bit alpha transparent PNGs. As an aside, to the best of my knowledge a 24bit PNG can't have transparency as it's not palettised and is split into three 8bit colour components (red, green, and blue). A 32 bit PNG adds an extra 8 bit alpha channel which allows translucency.

So how to be get alpha PNG support in IE? Well, it turns out that IE can farm images out to DirectX to be applied almost as a texture to the webpage. The way the MS previously recommended was to create a blank gif of the right size and apply the alpha transparent PNG via the use of their 'filter' system. This unfortunately breaks stuff for other browsers which can support alpha PNGs (i.e. anything newer than Netscape 4.0). Luckily there's a now famous 'behavior' that'll fix this automatically for you. If you search the web for 'png behavior' you'll find it easily enough. It's a plug and play solution that finds PNGs in your page and runs them through the filter system automatically.


Thread source:: http://www.webmasterworld.com/html/3046089.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com