使用引导程序将响应式设计保持在底部

时间:2013-12-11 06:53:08

标签: html css twitter-bootstrap

即使单击侧边栏的切换,如何将页脚保留在页面底部?我制作的页脚位于底部,但每当我点击侧边栏切换时,它就像这样上升

enter image description here

我正在使用bootstrap btw。

2 个答案:

答案 0 :(得分:0)

这就是我做的。我对结果并不完全满意,因为页脚的高度是一个固定的数字(如果高度可能是动态的,我更愿意)。

<div id="wrapper">
    All your contents, div, nav etc go in here
    <div id="push"></div> <!--add the push div here -->
</div>
<footer>
</footer>

CSS:

#push, footer {
height:100px; /*or whatever height you need */
}

我不确定你的代码是什么样的,所以我只希望这会有所帮助。

答案 1 :(得分:0)

我认为您正在寻找:http://getbootstrap.com/2.3.2/examples/sticky-footer.html

这是一个让你的页脚粘稠的插件。您可以在bootstrap下载的examples文件夹中找到代码。

相关问题