mhunt
04-15-2006, 01:58 AM
for some reason a div with a background image isnt showing up above another div with an image. I tried messing around with the z-index but the top div still doesnt come to the top.
here is the html document.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Portfolio Site</title>
<link rel="stylesheet" href="layout.css" media="screen" />
</head>
<body>
<div id="container">
<div id="orb">
</div>
<div id="header">
</div>
<div id="navigation">
</div>
<div id="banner">
</div>
<div id="content">
</div>
</div>
</body>
</html>
Here is the css:
html, body {
background-image: url("images/bg.gif");
background-repeat: repeat-x;
margin:0px;
padding:0px;
text-align:center;
background-color: #4e585f;
}
#container{
width: 730px;
position: absolute;
left: 50%;
top: 0px;
margin: 0px 0px 0px -375px;
padding: 0px 9px 0px 11px;
}
#orb {
background-image: url("images/orb.gif");
background-repeat: no-repeat;
width: 96px;
height: 92px;
position: absolute;
top: 5px;
left: -20px;
z-index: 0;
}
#header{
position:relative;
background-image: url("images/banner.gif");
background-repeat: no-repeat;
background-color: #6f7d87;
height:78px;
width:536px;
z-index: -2;
}
here is the html document.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Portfolio Site</title>
<link rel="stylesheet" href="layout.css" media="screen" />
</head>
<body>
<div id="container">
<div id="orb">
</div>
<div id="header">
</div>
<div id="navigation">
</div>
<div id="banner">
</div>
<div id="content">
</div>
</div>
</body>
</html>
Here is the css:
html, body {
background-image: url("images/bg.gif");
background-repeat: repeat-x;
margin:0px;
padding:0px;
text-align:center;
background-color: #4e585f;
}
#container{
width: 730px;
position: absolute;
left: 50%;
top: 0px;
margin: 0px 0px 0px -375px;
padding: 0px 9px 0px 11px;
}
#orb {
background-image: url("images/orb.gif");
background-repeat: no-repeat;
width: 96px;
height: 92px;
position: absolute;
top: 5px;
left: -20px;
z-index: 0;
}
#header{
position:relative;
background-image: url("images/banner.gif");
background-repeat: no-repeat;
background-color: #6f7d87;
height:78px;
width:536px;
z-index: -2;
}