【发布时间】:2016-12-07 02:45:27
【问题描述】:
我正在使用以下标记来创建底部版权横幅
<footer class="footer">
<div class="container">
<p class="text-muted">© Some Company</p>
</div>
</footer>
这里是 CSS
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
body > .container {
padding: 60px 15px 0;
}
.container .text-muted {
margin: 20px 0;
}
.footer > .container {
padding-right: 15px;
padding-left: 15px;
}
code {
font-size: 80%;
}
问题在于它与网站内容的底部重叠。
如何强制它往下走?
我对这个 CSS 不满意
.navbar-fixed-bottom {
padding-top: 10px;
height: 5%;
}
【问题讨论】:
标签: css html twitter-bootstrap footer