Forum Moderators: not2easy
CSS:
#wrapper {
position:absolute;
left: 50%;
top: auto;
width: 900px;
margin-top: 0px;
margin-left: -450px;
}
#wrapperFooter {
width:100%;
min-width:814px;
padding:0 0 2em;
position: absolute;
top: 1020px;
background-color: #0B274F;
height: 130px;
}
#footer {
width:820px;
margin:22px auto;
overflow:auto;
padding:0 0;
}
body {
background-image: url(images/bg.jpg);
margin: 0px;
background-repeat: no-repeat;
}
HTML:
<div id="wrapper">
<div id="container">
<div id="header">
</div>
<div id="main">
<div id="content">
</div>
<div id="sidebar">
</div>
</div>
</div>
</div>
<div id="wrapperFooter">
<div id="footer">
<div id="navSupplemental">
<ul>
<li>
</li>
</ul>
</div>
</div>
</div>
What I am looking for is to anchor the #wrapperFooter to the bottom of the #wrapper. If the #wrapperFooter was nested to #wrapper it would be simple, but it is not. The trick is that the #wrapper is a fixed width and the #wrapperFooter needs to be 100% window width with a background color (see CSS above), so I assume they need to be separate, not nested. Any other ideas?
Here is what I ended up with (minus the DIVs that are unrelated to this problem):
CSS:
#wrapper {
position:absolute;
left: auto;
width: 100%;
top: 0;
right: auto;
}
#container {
position:relative;
left: 50%;
width: 900px;
margin-top: 0px;
margin-left: -450px; /* half of the width to center */
top: 0;
padding-bottom: 40px;
}
#wrapperFooter {
width: 100%;
padding: 0 0 2em;
background-color: #0B274F;
height: 130px;
left: 0;
position: relative;
}
#footer {
width:820px;
margin:22px auto;
overflow:auto;
padding:0 0;
}
body {
background-image: url(images/bg.jpg);
margin: 0px;
background-repeat: no-repeat;
}
HTML:
<div id="wrapper">
<div id="container">
<div id="wrapperFooter">
<div id="footer">
<!-- END FOOTER -->
</div>
<!-- END WRAPPERFOOTER -->
</div>
<!-- END CONTAINER -->
</div>
<!-- END WRAPPER -->
</div>