The following CSS will take an element (or several elements if you use multiple selectors) and force IE6 to use its AlphaImageLoader and enable transparency in PNG files. In this example, #myElement is assumed to be a div with a background-image that uses a transparent PNG.
Typically, a snippet like this would exist in a <IE6 stylesheet to avoid validation problems in real browsers.
/* IE6 PNG transparency fix */
div#myElement {
behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='scale')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
);
}