Thread: z-index?
View Single Post
Old 21-04-2008, 07:24   #1 (permalink)
Ehab
Registered User
 
Ehab's Avatar
 
Join Date: Apr 2008
Location: San Diego, CA
Posts: 30
z-index?

hello again,
ok so my computer crashed on me a couple of days ago due to a horrible vista bug that cost me almost 20GB of irrecoverable data, all i tried to do was run the built in disk cleanup util and thank god i cancelled in time before windows literally ate itself up, but anyways, back up again and very frustrated and deadlines approaching so im doing everything again from scratch. basic layout, i want a centered div with a drop shadow on both sides. i started with a container, aligned it to the center, two divs on top of each other inside of it, one with the shadow and the top one with the content. i am trying to set the background color in the body tag to black so it matches the fadeout color of the shadow, but its not working for some reason, its staying white. is it becasue i am using z-index ?? (ive never used it before). here is the CSS and html again.

CSS:
body
{
margin: 0;
padding: 0;
text-align: center;
background: #000000;
}

#container
{
width: 80%;
margin: 0 auto;
}

#contentBack
{
position:absolute;
top: 0;
z-index: 0;
width: 975px;
height: 100%;
margin-left:0;
background-image: url(images/bg2.png);
background-repeat: repeat-y;
}

#contentFront
{
position: absolute;
top: 0;
z-index: 1;
width: 925px;
height: 100%;
margin-left:25px;
background-image: url(images/WSNEW.png);
}


HTML:

<body>
<div id="container">
<div id="contentBack"></div>
<div id="contentFront"></div>
</div>
</body>
</html>
  Reply With Quote