PNG Fix for IE6 for inline html IMGs


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. img, .png {
  2. position: relative;
  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 = "images/transparent.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. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.