Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PNG not shown as Transparent in IE6

Status
Not open for further replies.

damipera

Technical User
Dec 1, 2005
134
0
0
GB
Hello folks.

I have an image that's in .png format that is not recognized by IE6 as transparent. Instead it is greyish. In Firefox and IE7, no problem. I search the net and found that you could use:

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader

filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50)

This is ok if you want the WHOLE image to be of certain percentage transparent. My problem is that I have an image that has a drop shadow. I want my image and its drop shadow to be still 100% in opacity and anything outside them should be invisible/totally transparent.

Is this possible? I don't want to use .gif as the image's edges are serrated and not so good-looking.

Any ideas?

Thank you.



 
This is ok if you want the WHOLE image to be of certain percentage transparent.

I think you are confusing the AlphaImageLoader filter and the Alpha filter.

The latter will give the specified opacity to the whole image. The former is the correct filter to use to display the PNG exactly as it should be.

I would advise that you ensure the PNG is a 32-bit PNG, however.... I've had many issues in the past trying to get IE6 to display anything less than that.

If you are still having issues, post a URL to your site.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
IE6 is already two versions behind. But yes, IE only started supporting all sorts of transparency of PNG very late in IE7. IE6 just supported a transparent palette color, that is transparency like GIF also supported it.

There are plug-ins for IE6 that render PNG correctly. OR update/let users update to at least IE7.

Bye, Olaf.
 
For most people that library is probably quite a good idea, and even handles the different sizingMethods (crop, scale).

I prefer to do it myself, though... it gives me far more control over what is going on, and isn't really a hassle if you've done it many times before.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
You can read a post I made about this in the FAQ section here:

faq215-6640

And you can read about it on my blog as well:


And another one covering links that don't work in IE6 when the AlphaImageLoader is in play:


Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top