I've been experimenting with adjusting the z-index of elements in my code but haven't had any luck. Is it even possible to achieve what I want?
Within a div element, I have set a background image using CSS. Inside this div, there are other elements like divs and images. My goal is to keep the main div with the background image on top so that the rounded corners of the image show above the other elements.
Here's an example of the HTML:
<div id="mainWrapperDivWithBGImage">
<div id="anotherDiv">
<!-- Display this img behind the background image
of the #mainWrapperDivWithBGImage div -->
<img src="myLargeImage.jpg" />
</div>
</div>
And here's an example of the CSS:
/* How can I make the bg image of this div show on top of other elements contained
Is this even possible? */
#mainWrapperDivWithBGImage {
background: url("myImageWithRoundedCorners.jpg") no-repeat scroll 0 0 transparent;
height: 248px;
margin: 0;
overflow: hidden;
padding: 3px 0 0 3px;
width: 996px;
}