Click to See Complete Forum and Search --> : PNG Transparency - Is it safe?


MichaelF10
03-10-2009, 02:48 PM
Fairly simple question really, I want to get allot of peoples opinions on it though as I'm using it extensively throughout a website I'm designing and it's been an on going debate with myself.

Do you think it's safe to rely on the transparency of .png's?

happy_hands
03-10-2009, 03:29 PM
I can appreciate your challenge. Personally though, I don't think it's safe to rely on anything in web design!

I can't remember which browser/version it is, but I'm pretty sure one of the bigger ones can't support transparent png formats (or even png in any format).

Then of course you also have the users who have images swictched off for whatever reason, people who have visual imparements so making it accessible too without images and of course the new range of web broswers built into phones with sometimes quite limited functionality, or that like to switch around the whole design because of screen sizes.

In my case, I now ttry to design sites that work both with images on, and off (and still keep a workable design format), and don't rely on images being on at all for navigation, general content, etc (but if they are on, it looks nicer).

This I've found has had the positive impact of improved natural Search Engine Optimisation, and thus increased visitors too!
www.therapyagency.co.uk (http://www.therapyagency.co.uk)

rpgfan3233
03-10-2009, 03:42 PM
Prior to version 7.0b1, no version of IE natively supported the alpha channel in PNGs, and according to this page by the authors of the libpng library (http://www.libpng.org/pub/png/pngapbr.html), IE 4.0b1 was the first version to support PNG images at all. And I'm only talking about the Windows versions... xD

MichaelF10
03-10-2009, 04:57 PM
I'm pretty sure the only big browser that's still in the stone age on this one is IE6

According to : http://www.w3schools.com/browsers/browsers_stats.asp

That's roughly 17-18% of people.

Hence my concern.

rpgfan3233
03-10-2009, 05:39 PM
I'm pretty sure the only big browser that's still in the stone age on this one is IE6

According to : http://www.w3schools.com/browsers/browsers_stats.asp

That's roughly 17-18% of people.

Hence my concern.

Well, that's one figure. W3Counter's figure (http://www.w3counter.com/globalstats.php) says IE 6 users are near 26%. However, there is a campaign to "stop IE 6", the sort of thing developers have been wanting for a long time. I'm not sure if you're interested, but I just wanted to note that it exists. If you're not interested, I'd say go with GIF images if you want transparency or perhaps try using CSS to simulate things.

MichaelF10
03-10-2009, 05:46 PM
Well, that's one figure. W3Counter's figure (http://www.w3counter.com/globalstats.php) says IE 6 users are near 26%. However, there is a campaign to "stop IE 6", the sort of thing developers have been wanting for a long time. I'm not sure if you're interested, but I just wanted to note that it exists. If you're not interested, I'd say go with GIF images if you want transparency or perhaps try using CSS to simulate things.

My site is made entirely of CSS, Yes it is something I'm interested in, got a link? XD

http://www.ziptank.com
(It's incomplete but you can check out what I have so far)

MichaelF10
03-10-2009, 06:04 PM
woooooooo...

After some digging I found this:
http://tredosoft.com/Multiple_IE

Thought you guys may like it!

Now I can test how it's going to look without having to go to an out dated library or installing a virtual machine :P
EDIT: (OMG - It's working perfect.. right now it's freezing up!!)

The site is actually look better then I thought it would be without the transparency. I think I'm just going to use it and recommend that people change over.

MichaelF10
03-10-2009, 07:34 PM
I wish you could edit your posts so you don't have to keep posting again. =\

Oh well.

I found the perfect solution though to resolving the display issue in my website. I'll just disable showing the background on IE six and below. (Anyone have any idea how I can do that? lol)

Charles
03-10-2009, 08:39 PM
Anyone have any idea how I can do that?http://msdn.microsoft.com/en-us/library/ms537512.aspx

WebJoel
03-16-2009, 08:55 AM
If you add this before the "</head>" of your page(s) : <!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
<![endif]--> you fix the *png alpha-transparency trouble in IE and a host of other IE sins as well.

This is a perma-link, so yo can use it w/out fear of the referring link disappearing.

hquinn
03-16-2009, 04:08 PM
Thanks for the info guys, I had the same doubt on transparency on IE6

toicontien
03-16-2009, 04:14 PM
Internet Explorer 6 does support 32 bit PNGs (24 bit "true color" PNG with a transparency channel). And without the use of JavaScript.

Internet Explorer and Transparent PNGs (http://www.webdeveloper.com/forum/showthread.php?t=125373#post655131)

MichaelF10
03-16-2009, 08:48 PM
Internet Explorer 6 does support 32 bit PNGs (24 bit "true color" PNG with a transparency channel). And without the use of JavaScript.

Internet Explorer and Transparent PNGs (http://www.webdeveloper.com/forum/showthread.php?t=125373#post655131)

OH NICE! ..thanks for this!

lorenzo816
03-17-2009, 04:25 PM
MichaelF10:
Your question about safety, makes me think of a security issue but I know what you are asking.

All of the methods above are good answers to the problem
Separating style sheets, conditional comments and serving javascript like jquery or bobosola's method or etc. Also the GIF method is not an option sometimes when you are working with gradient shadows.


The W3C's stats are their stats. And think about it, what kind of people visit the W3C, web developers and other digital people so the stats are skewed.
You should really look at your own numbers in Analytics to determine if you need to design to IE6 still.
Read the fine print. (although I am not knocking it - I hate IE)
Browsers that count for less than 0.5% are not listed.

W3Schools is a website for people with an interest for web technologies. These people are more interested in using alternative browsers than the average user. The average user tends to use Internet Explorer, since it comes preinstalled with Windows. Most do not seek out other browsers.

These facts indicate that the browser figures above are not 100% realistic. Other web sites have statistics showing that Internet Explorer is used by at least 80% of the users.

Anyway, our data, collected from W3Schools' log-files, over a five year period, clearly shows the long and medium-term trends.

I used to have a link to an aggregater of browser usage but can't find it.
But I remember it being around 15-20% for IE6. I know I should use delicious

Going forward on sites I build (not corporate), I will not support IE6 at all.