Posted By

gryzzly on 08/12/09


Tagged

fix css png ie6


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

cesgra


image tag png fix for ie6


 / Published in: CSS
 

requires blank.gif (transparent 1px gif image)

  1. * html img, /*png fix for <img> */
  2. * html .png{
  3. behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
  4. this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
  5. this.src = "/style/blank.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
  6. this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
  7. this.runtimeStyle.backgroundImage = "none")), this.pngSet=true)
  8. );
  9. }

Report this snippet  

You need to login to post a comment.