PNG transparancy images in IE with CSS
Yes.. it can be done!! and so simple.... it's hard to believe that it works. Look at the code below to show your tranparant PNG also in Internet Explorer. .pngholder{
width:100px;
height:100px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='imagelocation');
}
.pngalpha {
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
background:url(imagelocation) no-repeat;
width:100px;
height:100px;
}
<!--- And this is your code to implement the image --->
<div class="pngholder"><div class="pngalpha"></div></div>
A PNG image is much nicer with transparancy then a GIF image. I needed this on a site for an advertising company that had a really nice logo on a random background. The GIF image was crap but the PNG was really good!! so I used the PNG to discover that transparancy didn't work in IE.... at least until my CSS guru came with the above solution.18282 viewed | 9 opinion(s) | del.icio.us | Digg it | Tjarko @ 27/09/05 16:47 cet



