0 Replies - 985 Views - Last Post: 28 November 2007 - 08:46 PM

#1 Israel  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 7
  • View blog
  • Posts: 821
  • Joined: 22-November 04

PNG Transparency Fix for IE 5|6

Posted 28 November 2007 - 08:46 PM

Description: The author of this code has allowed me to re-use it for </dic> but asks that any explanation of the code just be linked to his website here:

http://www.howtocrea...alpha.htmlPatch that allows Internet Explorer 5 and 6 to correctly render transparent backgrounds for png and gif files.
<!--[if gte IE 5.5]>
<![if lt IE 7]>
<style type="text/css">
#alImg1 img, #alImg2 img { filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0); }
#alImg1, #alImg2 { display: inline-block; }
#alImg1 { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='varyAlpha.png'); }
#alImg2 { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='alphaTwo.png'); }
</style>
<![endif]>
<![endif]-->

...

<span id="alImg1" style="width:400px;height:32px;">
<img src="varyAlpha.png" width="400" height="32" border="0" alt=""></span>
<span id="alImg2" style="width:30px;height:50px;">
<img src="alphaTwo.png" width="30" height="50" border="0" alt=""></span>


Is This A Good Question/Topic? 0
  • +

Page 1 of 1