Forum Moderators: not2easy
I tried:
<div id="mainContent">
...
<div id="footer">
</div>
</div>
#mainContent{
position: absolute;
top: 75px;
z-index: 0;
}
#footer{
position: absolute;
bottom: 0px;
z-index: 0;
}
But this caused the mainContent div to be moved down to the bottom of the page also. This does work if I make the mainContent have position: static; but in that case it isn't positioned quite as I'd like. Anyone know how to do this? Thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
* {
margin:0;
padding:0;
border:1px solid black;
}
#wrapper{
position:relative;
top:0;
margin: 0 auto;
width: 720px;
}
#content{
position:relative;
margin-top:100px;
top:0;
width: 720px;
}
#header{
position:absolute;
left:0;
top:0;
width: 720px;
height:100px;
}
#footer{
clear:both;
width: 720px;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="content">
Content
</div>
<div id="header">
Header
</div>
<div id="footer">
Footer
</div>
</div>
</body>