Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Location
    UK, England
    Posts
    268
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Transparent images

    What's the general stance to images with transparent backgrounds? Are they recommended if required? Will they work properly?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It depends on what quality you want. Some gifs can have transparent backgrounds and still be decent quality. Some can't. In which case you would likely want to use the png format. While most modern browsers IE7+, Firefox, Safari, Chrome, and Opera all support the alphatransparency on png images just fine however IE6 doesn't. You will need to use some js to get them to work properly. The JS will load Microsoft's alphatransparency filter allowing the images to look okay. Another issue you may run into when using png images is the color will vary between Internet Explorer and other browsers. IE will show the color on the png images darker. This can be a problem if you are trying to match a CSS color with the color on the png. There is a reason for this and it can be fixed quite easily with TweakPNG. Just remove the gAMA chunk from the png and resave it. It will now look fine in all browsers. Safari 1.3.x can't display png images properly but there is nothing you can do to fix that. Besides Safari is on version 4 already. Read this article for more on fixing the png color issue in Internet Explorer.

    http://f6design.com/journal/2006/12/...ing-png-gamma/
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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