我的内容与页脚重叠(粘性)。但它应该有一个正常的填充顶部。我如何使用 CakePHP(不相关)和 Twitter Bootstrap。 在某些页面上它有效,而在其他页面上则无效。我怎样才能解决这个问题?
CSS
body {
padding-top: 60px;
}
.sidebar-nav {
padding: 9px 0;
}
html, body {
height: 100%;
}
footer {
padding: 17px 0 18px 0;
border-top: 1px solid #000;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -63px;
}
.push {
height: 63px;
}
HTML
<div class="container-fluid wrapper">
<div class="row-fluid">
<div class="span11">
//content
</div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row-fluid">
<div class="span8">
</div>
<div class="span4">
<div class="footer-links pull-right>
//content
</div>
</div>
</div>
</div>
<div class="footer-floor">
<div class="container-fluid">
//content
</div>
</div>
</footer>
最佳答案
为了使粘性页脚起作用,您必须为 .push
和 .footer
设置高度。尝试将 63px
高度也添加到您的页脚。
.push, footer {
height: 63px;
}
关于html - Twitter-Bootstrap : Content is overlapping sticky-footer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13953309/