Print Page | Close Window

32bit PNGs not transparent

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8363
Printed Date: 28 March 2026 at 1:10am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 32bit PNGs not transparent
Posted By: Semikolon
Subject: 32bit PNGs not transparent
Date Posted: 27 December 2003 at 7:57pm

ive created some f**kin PNGs in Fireworks and set the background(canvas) to transparent.. when opening in windows and other programs they really are transparent, but in internet explorer theire not.. they get the same background color as one of the tables on my site.. in netscape(and probably mozilla too) the are transparent, but the 32bit alpha effects(like drop shadow and things like that) doesnt work there..

any of you have a clue abou how to do this?

yes i have to use pngs..(i guess some of you will ask about that if i dont write it)




Replies:
Posted By: Diep-Vriezer
Date Posted: 02 January 2004 at 8:20am
Internet Explorer can't proces PNG files correctly. That's the main problem I think.

BTW, PNG rulez

-------------
Gone..


Posted By: Semikolon
Date Posted: 02 January 2004 at 1:11pm

maddog said it was disabled in ie.. what a stupid f**king thing to do of microsoft..

i agree.. PNG is the best! actually pngs can get much smaller than both gif and jpg.. but with this f**king transparent thing in ie i cant use them to what i had planned..



Posted By: Diep-Vriezer
Date Posted: 02 January 2004 at 1:17pm
BTW, use the instead of F**K, it looks a bit better

-------------
Gone..


Posted By: Semikolon
Date Posted: 02 January 2004 at 1:22pm
jeje.. who cares.. i just didnt take the time to write ..


Posted By: Diep-Vriezer
Date Posted: 02 January 2004 at 4:51pm
is just [ X X X ]

-------------
Gone..


Posted By: Diep-Vriezer
Date Posted: 02 January 2004 at 4:55pm
Which is ALMOST shorter then F**K

-------------
Gone..


Posted By: Semikolon
Date Posted: 02 January 2004 at 6:55pm

okay then.. i didnt know the code for it..

so where have you been the last days? havnt seen you around here..



Posted By: wolfie
Date Posted: 13 January 2004 at 5:27am

This is what you need:
http://www.wolfweb.co.uk/img/pngbehavior.htc - http://www.wolfweb.co.uk/img/pngbehavior.htc

You need to set the style or a CSS document like this.

CSS
.png {behavior: url("/img/pngbehavior.htc");}

Style
style="behavior: url("/img/pngbehavior.htc");}"

Either way, you need to set up you <img> tag like so...
<img src="uri.png" width="whatever" height="whatever" alt="whatever" style/class="delete as appropiate">

That will sort out your .png file problems and make them transparent.



-------------
Wolfie--[ http://www.wolfweb.co.uk - WolfWeb.co.uk ]
PHP, .net--[ beginner ] ASP, VB, C, SQL--[ intermediate ] X/D/HTML, CSS, WML, XML--[


Posted By: Diep-Vriezer
Date Posted: 13 January 2004 at 9:02am
Originally posted by AnthraX AnthraX wrote:

okay then.. i didnt know the code for it..

so where have you been the last days? havnt seen you around here..

Have been to a LAN party, and my mailbox crashed or something. Couldn't acces my mail for a week.



-------------
Gone..


Posted By: Necronom
Date Posted: 03 February 2004 at 5:18pm

is the htc workaround cross-browser compatible?

. necronom .



Posted By: Semikolon
Date Posted: 03 February 2004 at 5:25pm

IE is the only browser you need that component.. pngs are transparent in mozilla and netscape.. think it is in opera too, and then you have covered mostly all users

thanks wolfie! i will try this out right away..



Posted By: Necronom
Date Posted: 03 February 2004 at 5:30pm

Thanks!

one last quession... what goes in the "delete as needed" part? and does it have to be htc? can I change it to css or just copy past it into my current css?

. necronom .



Posted By: Semikolon
Date Posted: 03 February 2004 at 5:53pm

i found an error.. when getting this to work, i first got a red cross over my 32bit apha png, that was because it couldnt find the transparent gif.. i pointed to a transparent gif, 1px and then, the image disappeared! i did some research in this htc document, and found that on line 43,  "AlphaImageLoader(src='" + realSrc + "',sizingMethod='scale')"; ,sizingMethod='scale' should be deleted, now it works fine!

thanks again wolfie!

btw, when using style (in the image tag) it should be like this style="behavior: url('pngbehavior.htc');}" with single quotes, not like this style="behavior: url("pngbehavior.htc");}" with double quotes..

 

Necronom, your img tag should look like this:

<img src="32bit_alpha.png" class="png" />

if adding .png {behavior: url("pngbehavior.htc");} to your stylesheet, or like this:

<img src="32bit_alpha.png" style="behavior: url('pngbehavior.htc');}" />

if you dont use CSS




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net