Forum Moderators: open

Message Too Old, No Replies

IE 6 PNG Transparency Bug

Is there a good JavaScript out there that can fix this?

         

cosmoyoda

5:56 am on Nov 17, 2007 (gmt 0)

10+ Year Member



A friend of mine once told me he had used a JavaScript to fix the famous IE 6 transparency bug with PNG images that have some opacity on. This is quite frustrating, because everytime we see a PNG with transparency on the WEb using IE 6, it will give you an ugly look with a light blue background. Yak!

Do you guys know if there is a JavaScript somewhere on the Web that can fix this? And if there is one, what JavaScript should I use to use that script IF the user's browser IS IE 6 using If and Else? For instance, something like

if { browser=IE6

Show This JavaScript To Fix PNG Bug!
}

else {
Do nothing!
}

Sorry for my lack of JavaScript knowledge. I'm just not really familiar with the syntax yet.

Thanks for the help!

tedster

6:26 am on Nov 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First, there is "some" degree of transparency support in IE 6, it's just not full 24-bit support. The easiest fix, where possible with your images and design, is to use only the supported types of transparency in your png files.

There's a very full discussion of this in an earlier thread here [webmasterworld.com]. It includes a link to test images of the various types of png transparency, on this page:

[libpng.org...]

There is also a scripted fix for this png transparency problem. It creates an .htc file for IE 5.5 and 6 to use. ( Reference [msdn2.microsoft.com...] )

[webfx.eae.net...]

cosmoyoda

12:47 am on Nov 29, 2007 (gmt 0)

10+ Year Member



tedster, thank a lot for your help and for the links, they are really helpful.