【问题标题】:How to push the footer to the bottom of the screen? [duplicate]如何将页脚推到屏幕底部? [复制]
【发布时间】:2011-10-03 20:58:53
【问题描述】:

可能的重复:
How to align footer (div) to the bottom of the page?
http://www.google.com/#q=bottom+footer+site:stackoverflow.com

如何将页脚推到页面底部?

我尝试了很多方法,但没有任何效果:)

我的 HTML

<div id="header">
.
.
</div>

<div id="container">
.
.
</div>

<div id="footer">
    <div id="footerContent">
.
.
    </div>
</div>

http://www.doturbo.com/test/404.html

http://www.doturbo.com/test/contact.html

【问题讨论】:

标签: html css


【解决方案1】:
position: absolute;
bottom: 0px;

【讨论】:

  • 我试过这种方式。它没有工作:)
  • @faressoft:为什么这不起作用?这是最“快速”的解决方案。但是它有它自己的问题,比如当内容增加时,它会与页脚重叠。给你的 html,body 一个 100% 的高度,给
    一个绝对的位置,底部:0px;
【解决方案2】:

我发现下面链接的方法对我的个人需求最有效:

http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

【讨论】:

    猜你喜欢
    • 2017-06-10
    • 2013-09-15
    • 2013-08-05
    • 2013-04-29
    • 1970-01-01
    • 2011-11-24
    • 2013-08-19
    • 2016-02-01
    • 1970-01-01
    相关资源
    最近更新 更多