0

I would like fix footer at the bottom of the page, I tried CSS

 #footer {
    position: absolute;
    botom: 0;
}`

HTML

<div class="row">

    <div style="width: 155px; float: right;">
        <a href="http://zazoo.com/privacy/">Privée </a> | <a href="http://zazoo.com/terms-of-service/"> Conditions </a>
    </div>
</div>
<footer>
    <hr>
    <p>
        zAZOO est un service de sTELLA SAS, 40, rue Raymond debré, 93450, St denis,<br /> France, RCS 510 752 645 NANTERRE
    </p>
</footer>

4

4 回答 4

3

try this without id you have use to footer html5 tag in this Demo

footer{
    position:fixed;
    bottom:0;
}

DEMO

OR

and with #footer you have use to below Demo.

DEMO

#footer{
    position:fixed;
    bottom:0;
}
于 2013-08-07T08:58:15.107 回答
0

首先纠正错别字。接下来,页脚不是 ID,而是元素的名称,因此您必须使用:

footer {
    position: absolute;
    bottom: 0;
}

工作示例:

http://jsfiddle.net/kqJrf/

于 2013-08-07T09:00:19.623 回答
0

您的 css 需要少量编辑。这是有效的。

 footer {
    position: absolute;
    bottom: 0;
}

http://jsfiddle.net/qVVWr/

于 2013-08-07T09:02:25.280 回答
0

Fags 说的方式很好,但请注意,页脚元素是为了让浏览器了解您的页面内容,而不是设置样式。所以最好像这样使用它:

HTML

<footer id="main-footer">
    <p>Some Text is here</p>
</footer>

CSS

#main-footer {
    position: fixed;
    bottom:0;
}

给这个元素一个 id 或 class 的第二个原因是,如果你使用 HTML5,你会在页面上使用多个元素。

于 2013-08-07T09:05:38.737 回答