agent_x
12-21-2004, 10:33 AM
How do I make a CSS footer that stays at the bottom of the page when the content of the page is too short. And it will shift to the bottom of the content when the content is longer than the page.
#Content {
margin:0px 50px 50px 200px;
padding:10px;
}
#Menu {
position:absolute;
top:100px;
left:20px;
width:172px;
padding:10px;
background-color:#eee;
border:1px dashed #999;
line-height:17px;
/* Again, the ugly brilliant hack. */
voice-family: "\"}\"";
voice-family:inherit;
width:150px;
}
#Footer {
font-size:10px;
background-color: #eee;
width: 100%; /* See note below */
text-align: left;
padding:10px 0px 0px 0px;
margin:0px 0px 0px 0px;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#eee;
}
The problem I have now is that whenever the content is too short... The menu will overlap the footer. When the put the footer to absolute, the footer won't flow with the content. It will be smack right in the middle...
#Content {
margin:0px 50px 50px 200px;
padding:10px;
}
#Menu {
position:absolute;
top:100px;
left:20px;
width:172px;
padding:10px;
background-color:#eee;
border:1px dashed #999;
line-height:17px;
/* Again, the ugly brilliant hack. */
voice-family: "\"}\"";
voice-family:inherit;
width:150px;
}
#Footer {
font-size:10px;
background-color: #eee;
width: 100%; /* See note below */
text-align: left;
padding:10px 0px 0px 0px;
margin:0px 0px 0px 0px;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#eee;
}
The problem I have now is that whenever the content is too short... The menu will overlap the footer. When the put the footer to absolute, the footer won't flow with the content. It will be smack right in the middle...