Log in

View Full Version : overlay image on top??



chas
07-09-2008, 03:05 PM
if i use divs



.image1{background-image: (url); }
.image2{background-image: (url); }

<div class="image1">
<div class="image2"></div>
</div>


how do i make it so that the image 2 sticks over the top and ABOVE image1 ie image 2 is twice the height of image1

Nile
07-10-2008, 02:32 AM
Try this:


<style type="text/css">
.image1{
position: absolute;
z-index: 2;
background-image: (url);
}
.image2{
position: absolute;
z-index: 1;
background-image: (url);
}
</style>
<div class="image1">
<div class="image2"></div>
</div>