/ Published in: CSS
Expand |
Embed | Plain Text
* html img, * html .png{ azimuth: expression( 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 = "/images/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='crop')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true ); }
Comments
Subscribe to comments
You need to login to post a comment.

Um... look under the Most Popular links on the home page. There is already a solution for this. Is there a reason this one is better, or is it just a different way to do the same thing?
Just curious:)
if you talk about it (http://snipplr.com/view/137/png-background-transparency-ie/), there hack only for one picture, but it is a decision for all of pictures of png
Nice snipple! But I cant get it to work with background images. Anyone else got this problem. Its supposed to work om backgrounds to right?
The transparency PNG 'fix' does NOT work for repeating images so unless it's a 1-image static background it won't work.