Issue
I made the following sticky footer using CSS. The bottom page content is currently hidden behind the footer (see the attached screenshot). How can I adjust my CSS so that all of the body content is visible and the footer remains stuck to the bottom of the browser window? Thank you!

CSS:
.fo {
position: absolute;
left: 0;
bottom: 0;
height:65px;
width: 100%;
color: #eaeaea;
margin-left: -8px;
}
Solution
I came across this answer out on the internet in the past. Works great:
HTML
<div id="container">
<div id="header"></div>
<div id="body"></div>
<div id="footer"></div>
</div>
CSS
html,
body {
margin:0;
padding:0;
height:100%;
}
#container {
min-height:100%;
position:relative;
}
#header {
background:#ff0;
padding:10px;
}
#body {
padding:10px;
padding-bottom:60px; /* Height of the footer */
}
#footer {
position:absolute;
bottom:0;
width:100%;
height:60px; /* Height of the footer */
background:#6cf;
}
/* IE 6 and down:
#container {
height:100%;
}
Answered By - kthornbloom
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.