andygrant
10-28-2008, 09:45 PM
I'm trying to use a semi transparent PNG and have found that when using opacity/alpha the transparency of the PNG is lost in Internet Explorer. It works fine in Firefox but goes solid in IE.
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>
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>