what's wrong with this code?

Status
Not open for further replies.

iL <

Active Member
112
2009
0
0
Okay, here's the problem.
I have a background image and then an image i need to go over that.
here's my current code:

html:
Code:
<div class="shadow">
<img src="./images/bg-shadow.png" style="position: relative;">

</div> 

<div class="body">
<img src="./images/body_bg-bg.png" style="position: relative;">
</div>

CSS:
Code:
.shadow { 
position:absolute;  
z-index:0; 
} 

} 
.bodybg { 
position:absolute; 
z-index:1;
}

The <div class="shadow"> wont center, unless i remove the " from style="position: relative;">, but if I do that, the second image, <div class="body">, doesn't work. It's odd, it should work? right?
 
3 comments
Use Css Code Like This
.bodybg {
background-image: url(/images/body_bg-bg.png);
position:absolute;
z-index:1;
}
 
Status
Not open for further replies.
Back
Top