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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    PNG transparent images in IE

    My PNG transparent images have gray backgrounds in IE6 does anyone know how to fix this? Should I use .gif?

  • #2
    Regular Coder BoldUlysses's Avatar
    Join Date
    Jan 2008
    Location
    Winston-Salem, NC
    Posts
    938
    Thanks
    10
    Thanked 190 Times in 187 Posts
    You don't have to revert to GIFs. You'll have to use a little bit of JavaScript to get alpha-channel transparency (the kind PNGs use) to work in IE6.
    matt | design | blog

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I saw some stuff about that but what if a visitor has java turned off, is there a work around for that? Thank you by the way for replying, I will use this method unless there is a better way to cover all possibilities.

  • #4
    Regular Coder BoldUlysses's Avatar
    Join Date
    Jan 2008
    Location
    Winston-Salem, NC
    Posts
    938
    Thanks
    10
    Thanked 190 Times in 187 Posts
    Negative. If a user has JavaScript turned off, then you're SOL.

    The script works well but isn't totally foolproof, either. I tried to use it recently when making a faux column layout in conjunction with a sticky footer, and the background image I had applied to #wrap and repeated vertically ran over the footer. So in that case I made a special background image for IE6, without the transparency, and resorted to good ol' conditional comments:

    Code:
    <!--[if lte IE 6]>
      <link rel="stylesheet" href="css/ie6.css" type="text/css" />
    <![endif]-->
    and

    Code:
    #wrap {
    	background:url("../images/wrap_bg2ie.png") repeat-y;
    }
    It's not ideal but the visual difference isn't glaringly obvious. It's a judgment call.
    Last edited by BoldUlysses; 02-26-2009 at 07:09 PM.
    matt | design | blog


  •  

    Tags for this Thread

    Posting Permissions

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