I have two div's, nested, and want to have an image placed in front of the inner-div's content, so as to look like decoration around the edges (much of it is transparent.)
I thought using z-index and absolute positioning would do it, but it has not worked. My simple test is to use two nested div's each with a background image and try to control which one is in front by changing the z-index value. No joy - what am I doing wrong?
<style type="text/css">
div
{
width: 300px;
height: 300px;
border: solid 1px black;
background-repeat: no-repeat;
background-position: 0px;
}
</style>
<div style="background-image: url(coffee1.png); z-index: 3; position: absolute; left: 0px; top: 0px;">
</div>
<div style="background-image: url(coffee2.png); z-index: 1; position: absolute; left: 0px; top: 0px;">
</div>
Thanks,
Matt.