4 replies [Last post]
TK-425
TK-425's picture
Offline
newbie
Over there
Last seen: 11 years 51 weeks ago
Over there
Joined: 2008-04-05
Posts: 7
Points: 0

I'm wondering if it's generally safe to use .png's when I need an image with alpha capabilities. i.e. when I'm using one image over another, or implementing a shadow effect over a bg image, etc.

I can just use .gif's (providing I don't need varying levels of alpha transparency. I'm sure we're all familiar with the jagged white pixels around some web animations) or .jpg, but they're a lot less convenient for obvious reasons.

The only thing that's making me wonder is that I remember previous versions of IE don't display the alpha layers of .png's, and if a substantial portion of web users haven't updated to a newer version of IE yet, or moved to Firefox, any design I use .png's in will appear really tacky.

Any comments?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 13 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Hi TK , welcome to the

Hi TK , welcome to the forum, I noticed your post in 'Site Discussion' glad the forum sign up was speedy Smile

First port of call on a forum after 'Lurking' when asking a question is to do a quick check through the archives to see what if anything has already been said on the subject. Alpha transparency has been discussed quite often so there is some useful info to be gleamed from past threads, of course these threads may well throw up further questions in which case do ask for any clarification you require on points, in this thread you have started.

http://csscreator.com/search/node/alpha+transparency

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 25 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

TK-425 wrote:The only thing

TK-425 wrote:
The only thing that's making me wonder is that I remember previous versions of IE don't display the alpha layers of .png's

IE6 does actually support alpha transparency on 8-bit PNGs to a certain extent. For more info:

http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/
http://www.sitepoint.com/blogs/2008/03/20/making-ie6-friendly-png8-images/
http://www.sitepoint.com/blogs/2008/03/11/png32-hacks-and-ie6-is-it-worth-it/

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

thursday0384
Offline
Regular
Last seen: 9 years 36 weeks ago
Timezone: GMT-4
Joined: 2008-03-10
Posts: 42
Points: 0

you can also use js to get

you can also use js to get alpha transparency in ie6, ie7 supports it

TK-425
TK-425's picture
Offline
newbie
Over there
Last seen: 11 years 51 weeks ago
Over there
Joined: 2008-04-05
Posts: 7
Points: 0

Hi Hugo. Thanks for the

Hi Hugo. Thanks for the reply. I apologize for not searching first. I should have thought of that.

Anyway, thank you (Hugo, Tyssen and thursday0384) for answering my question. I think I'll just stick with using part of the background with a flattened image.