Fixing PNG Transparency for IE6
Thursday, 24 December 2009 23:32   


pngfix-ie6IE 6 doesn’t support alpha transparency on a PNG, but there are tons of solutions on the Web Resources. Of course, not all of them are easy to use, but the one I’ve been the most happy with is the TwinHelix solution
Download the iepngfix script here, and copy the iepngfix.htc and also create blank.gif files put into your stylesheets folder.


Open the iepngfix.htc file, and locate this code:

if (typeof blankImg == 'undefined' ) var blankImg = 'blank.gif' ;
Next, change it to the following:
if (typeof blankImg == 'undefined' ) var blankImg = 'stylesheets/blank.gif' ;

To work properly, the HTC file needs to use a blank .gif file to complete the transparency, and it needs you to provide a link that’s relative to the HTML file it’s being applied to, not the style sheet.
Add this line to your IE 6 conditional comment rule in the index.html file: