View Full Version : Transparent PNG problems
Katus
05-29-2006, 03:34 AM
I just found out that transparent png images don't load on IE 5 and 6 in Windows, and being a Mac operator this is frustrating! I have found scripts on the net that apparently fix this problem, but what they all say is that you need to specify the height and width of the png. I don't understand where those attributes are supposed to go in the script, and I have a whole navigation bar that uses transparent png's as well as a few images. Can anyone explain it to me without the tech talk? I am only new at scripting!:eek:
jscheuer1
05-29-2006, 09:26 AM
Some tech talk is required. If you truly have transparent.png's the solution should be much simpler than that given in the tutorials you mention. There is such a thing as alpha channel transparency, that doesn't work in IE without using its proprietary alpha image loading filter. If however, your .png is saved using 256 colors or less, you can use regular transparency (setting the transparency to a single color). This is the same sort of transparency that .gif's are capable of. Using that type of transparency, the image will work fine in IE. If you need to have more colors or simply cannot bring yourself to edit all your images, the alpha filter will need to be used to get them to work in IE. This is a bit complicated, no way around that but, width need not be specified if the position is absolute. There are other ways. The element must have 'layout'. The biggest issue is that the image cannot be rendered using an image tag. It must be a filter for a block level element, like a table cell or division. It will appear as a sort of background to that element, but it is not a style background. To get an idea of how this works, you really need to see it in action in the browser. Do you have access to a windows based PC?
Katus
06-05-2006, 01:33 AM
Thanks for the response. I had a look at the settings for my PNG, and the only one is transparency or no transparency, I am making them PNG-24. But PNG-8 has all the number of colours etc, but doesn't give me the quality that I need that PNG-24 has. So i guess Alpha filter is the way to go. So I would just include the scripting that I have found in the head of the page, no mention of sizes etc? What do you mean by absolute position? I found the script at http://homepage.ntlworld.com/bobosola/index.htm
I don't have immediate access to a PC, but can call someone who does and get them to check the pages.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.