Return to Snippet

Revision: 29409
at July 28, 2010 21:12 by reynish


Initial Code
img, .png {
       position: relative;
       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 = "img/spacer.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='crop')",
       this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)); }

Initial URL


Initial Description
This will fix all embeded PNGs.
this.src = "img/spacer.gif"
Needs to point to a 1x1 transparent GIF or you'll get an Image not found icon in the corner of the PNGs.

Initial Title
IE Fixes: Embeded PNG Transparency

Initial Tags
ie

Initial Language
CSS