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> Code (markup):
IE hates png's. It does not display them correctly. Save your files as gif's instead and they should work.
IE developers should be slapped all day for not having implemented PNG properly years ago. If the images are part of your layout and not user-generated content, I'd set the opacity by editing them.