Forum Moderators: not2easy
A small small example of the problem is shown below, shadow.png would be a semi transparent drop-shadow which works fine normally, but breaks when I apply opacity/alpha. I need to use opacity/alpha as I'm fading an error message div in and out when required.
If anyone knows how to keep the PNG transparency when used with opacity/alpha, please help.
Thanks
<html>
<head>
<style type="text/css">
img {
opacity: 0.25;
filter: alpha(opacity=25);
}
</style>
</head>
<body>
<img src="shadow.png" />
</body>
</html>
There are a number scripts out there that try to fix IE6 and lower lack of proper support for PNG images.
My personal favorite is to us IE7.js, but there are many solutions out there on the web.
From memory (I didn't actually try it right now), this worked (in the CSS):
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='shadow.png',sizingMethod='scale');
Oh, BTW: make sure to hide all this nonstandard stuff from other browsers by using conditional comments.