Forum Moderators: not2easy

Message Too Old, No Replies

Make a background image bleed through...

         

madcat

4:59 pm on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think this is possible but...

How could I bring an imported background image to the foreground? I'd like this image to cover an absolutely positioned <div> - that has a solid color background image itself...

Thanks for any help~

garann

7:44 pm on Sep 18, 2003 (gmt 0)

10+ Year Member



Hmmm.. Don't know if I follow, but does this work?


#foreGround {
background: transparent url(Image1.png) no-repeat;
position: absolute;
top: 20%;
left: 20%;
z-index: 2;
}
#background {
background: url(Image2.jpg) no-repeat;
position: absolute;
top: 20%;
left: 20%;
z-index: 1;
}

That should work if the image you wanted in the foreground was a gif or a png, something with both opaque and transparent areas.. then you'd see your background image through the transparent places. You can also just plop an image into the equivalent of the #background block and use absolute positioning to line it up the way you want.

hth?
g.