Forum Moderators: not2easy

Message Too Old, No Replies

How to use a transparent PNG as a background?

png transparency ie

         

mihai2u

11:32 am on Sep 1, 2006 (gmt 0)

10+ Year Member



How can I make the PNG tile in IExplorer?

Is the filter method capable of tileing the PNG?

This is the code i've used, but did not find any solutions except using a much-much bigger image for the iexplorer. The problem is the image size: >1 MB for 1000x800px.

div#container {
background:url(backcont.png) repeat-y;
}

* html body div#container {
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src='backcont.png', sizingMethod='crop');
background:none;
}

Any help will be apreciated.

Robin_reala

11:55 am on Sep 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your options are crop (like you're using), image (which uses the original image dimensions), and scale (which scales the image to fit the box). No tiling unfortunately. Do you have to have alpha transparency for IEs5&6? You might be able to get away with 1-bit transparency for them, and full 8bit for IE7 and everyone else...

mihai2u

12:32 pm on Sep 1, 2006 (gmt 0)

10+ Year Member



I have to have alpha transparency for IE6, because 1-bit transparency doesn't look good enough.

Robin_reala

1:43 pm on Sep 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately you're going to be stuck with a big image then. At least you can keep your tiled image for everyone else.

Have you tried running your PNG through a compressor? Photoshop's PNG output is horribly large, and even Fireworks can do with some work. I use OptiPNG but PNGcrush is fine as well. That might get it down below a meg.

mihai2u

2:33 pm on Sep 1, 2006 (gmt 0)

10+ Year Member



Thanks for the advice... made my file drop his size with 100K. It's a lil' better. Great tool.