/ Published in: CSS
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.
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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)); }