页脚无法流向页面底部 [英] Footer not flowing to bottom of page

查看:97
本文介绍了页脚无法流向页面底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示在页面顶部的黄色页脚块应该以页脚通常的形式流向内容的底部。

The yellow footer block that appears towards the top of the page should flow to the bottom of the content as a footer normally would.

这里是#footer的CSS:

here is the CSS for #footer:

#footer {
    background-color: #2F3B47;
    padding: 20px;
    height: 180px;
    float: none;
    clear: both;
}



我需要解决方案像一个粘性页脚到内容块的底部,而不管内容div的heighth。非常感谢您的任何提示或帮助!

I need the solution to work like a "sticky footer" so that it flows to the bottom of the content block regardless of the heighth of the content div. Thanks for any tips or help!

推荐答案

像这样?

    position: fixed;
    left: 0;
    bottom: 0;

这篇关于页脚无法流向页面底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆