Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - 32bit PNGs not transparent
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closed32bit PNGs not transparent

 Post Reply Post Reply Page  <12
Author
wolfie View Drop Down
Groupie
Groupie


Joined: 18 November 2002
Location: United Kingdom
Status: Offline
Points: 64
Direct Link To This Post Posted: 13 January 2004 at 5:27am

This is what you need:
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--[ WolfWeb.co.uk ]
PHP, .net--[ beginner ] ASP, VB, C, SQL--[ intermediate ] X/D/HTML, CSS, WML, XML--[
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Direct Link To This Post 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..
Back to Top
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Direct Link To This Post Posted: 03 February 2004 at 5:18pm

is the htc workaround cross-browser compatible?

. necronom .

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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..

Back to Top
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Direct Link To This Post 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 .



Edited by Necronom
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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

Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.