PNG transparency

Author
Discussion

braddle

Original Poster:

62 posts

247 months

Monday 3rd April 2006
quotequote all
Has any one used a hack to get transparency in PNG's working in IE i have tried a few and cant get them to work. Any ideas??

Cheer

mr_yogi

3,279 posts

256 months

Monday 3rd April 2006
quotequote all
I've had a play and in the end I decided to use a clear background and give it a miss.

The problem is that some of the hacks only support images and not background images (some of which I was using) and others require 32bit pngs... Photoshop CS I (don't know about CS-2) only supports 24bit pngs, and therefore it don't work

This page here works for images and if you're handy with a bit of scripting you might be able to hack it for other situations (It was the regular expressions that stumped me ) Also if you even compare that siote between IE and firefox it's still not perfect.

Plotloss

67,280 posts

271 months

Monday 3rd April 2006
quotequote all
Macromedia Fireworks makes life a LOT easier when it comes to PNGs

Edt

5,103 posts

285 months

Tuesday 4th April 2006
quotequote all
braddle said:
Has any one used a hack to get transparency in PNG's working in IE i have tried a few and cant get them to work. Any ideas??

Cheer



iirc there were some IE version issues.. worked in some not in others, when I tried it so no guarantees! further, recall Netscape was a no go too (though this was while ago pre Firefox etc).

size13

2,022 posts

258 months

Tuesday 4th April 2006
quotequote all
I think PNG8's will work in IE6 and above.

braddle

Original Poster:

62 posts

247 months

Tuesday 4th April 2006
quotequote all
Thanks for all the advice, got the hack to work finally with a lot of fine tuning! is you interesting here is the code

#header {
vertical-align: top;
text-align: left;
background-color: #3333FF;
background-image: url(image.png);
background-position: right top;
background-repeat: no-repeat;
position: absolute;
top: 2.5%;
left: 5%;
right: 5%;
height: 20%;
width: 85%;

padding-left: 5%;
padding-top: 2%;
padding-bottom: 0%;
}

* html #header
{
background-image: none;
filter: progid: DXImageTransform.Microsoft.AlphaImageLoader(src="image.png", sizingMethod="scale";
}