http://jsfiddle.net/jSB53/embedded/result/
/* Sticky footer styles
-------------------------------------------------- */
html, body {
height: 100%;/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -70px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
#footer {
background-color: #ee3124;
color: #FFFFFF;
height: 70px;
padding: 20px 0 0;
}
.navbar-default {
border-bottom: 5px #ee3124 solid;
background-color: #fff;
margin-top: 20px;
height: 33px;
-webkit-box-shadow: 0 4px 4px -2px #C7C7C7;
-moz-box-shadow: 0 4px 4px -2px #C7C7C7;
box-shadow: 0 4px 4px -2px #C7C7C7;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
答案 0 :(得分:0)
由于您已将页脚高度设置为70px,因此您还需要调整#wrap底部填充..
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by its height */
margin: 0 auto -70px;
/* Pad bottom by footer height */
padding: 0 0 70px;
}