Results 1 to 3 of 3

Thread: Transparent PNG problems

  1. #1
    Join Date
    May 2006
    Location
    Sydney, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Transparent PNG problems

    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!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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?
    Last edited by jscheuer1; 05-29-2006 at 09:34 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •