Jump to content


PNG File Transparency


5 replies to this topic

#1 Hayden

    P2L Jedi

  • Members
  • PipPipPip
  • 716 posts
  • Gender:Male
  • Location:Texas

Posted 01 October 2007 - 09:44 PM

I know how to do it, although I haven't gotten it to work for PNG files I use as background in my CSS, but just to pose a question.

Should I bother worrying about the transparency in little icons that do not work in IE6 but works fine in IE7 and any other browser I have seen so far?

I am thinking not as most users seem to either be using IE7 or Firefox or some other browser in Windows XP and Windows Vista only comes with IE7 now.

#2 Ghost

    Honored P2L Member

  • P2L Staff
  • PipPipPip
  • 675 posts
  • Gender:Male
  • Location:Australia

Posted 02 October 2007 - 12:04 AM

Well you can get js hacks which make png's work in IE 6.. Google it :huh:

#3 Hayden

    P2L Jedi

  • Members
  • PipPipPip
  • 716 posts
  • Gender:Male
  • Location:Texas

Posted 02 October 2007 - 04:26 PM

I have the hacks or at least A hack.

It doesn't do it for png files used in the CSS though, only the ones actually on the page using <img src="" />


I'm just curious to think what everyone else thinks about bothering with the little icons too. I'm tempted to just say screw it as most are moving into IE7 or other browsers that support it without the JS hack.

#4 PaintingBlack

    Young Padawan

  • Members
  • Pip
  • 56 posts
  • Gender:Male
  • Location:Winnipeg, MB

Posted 02 October 2007 - 05:32 PM

In my opinion, it is the small details that count. A lot of people still do use IE 6, and it's better to fix something that's possible, than to put it aside. You can try using a separate stylesheet for IE 6 and below, using different images, or search up more .png transparency hacks. It is quite possible without a separate css file , but I can't name off the site I'm thinking of off the top of my head.

#5 Ghost

    Honored P2L Member

  • P2L Staff
  • PipPipPip
  • 675 posts
  • Gender:Male
  • Location:Australia

Posted 02 October 2007 - 11:08 PM

There's a hack which works for background images... but it doesn't work if the background image is repeated. Having no-repeat works fine though :D But that limits the amount of stuff you can do I guess..

#6 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 03 October 2007 - 12:03 AM

One other semi-more sensible hack i heard somebody do was to change the .png's to gif's for ie6. The thing i don't like about that is having to double up on files.

Since the Alphaimageloader filter thingy actually changes the image into a background image, all you have to do is run through the code and find elements with .png backgrounds, remove the background, and use the filter (per the rule mentioned by Ghost). I believe i also saw a script somewhere that did this (google works wonders).

Also, you wouldn't belive how many times i had to rework a site because my client uses IE6, and for some reason, what i did was totally botched in IE6... You have to remember, people naturally don't like change (to a geek, new technology is one thing, to average joe, it's just something different, and people don't like different), so they just tend to ignore that windows update icon in the task bar (or disable it).

Edited by rc69, 03 October 2007 - 12:05 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users