css为页脚文本

时间:2009-10-14 11:07:06

标签: html css footer

我正在用一个简单的css片段来填充页脚文本。 页脚文本必须始终位于页面的末尾屏幕的末尾,无论后来如何。

3 个答案:

答案 0 :(得分:0)

* {
    margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}

/*

Sticky Footer by Ryan Fait
http://ryanfait.com/

*/

答案 1 :(得分:0)

对于一个可以分开的工作示例,我之前为我们的客户完成了同样的事情:

Pushed Down Page - Fixed Position Page

答案 2 :(得分:-1)

使用bottom属性:

#footer
{
    position:absolute;
    bottom:2px;
}