HTML5正文和页脚

时间:2014-03-05 18:07:43

标签: html css footer

我有一个主体宽度约为95%的网页,所以问题是我希望页脚是100%即使我知道页脚是主体的孩子这使得页脚与身体的宽度相等。

Here is an example of my problem

无论如何我可以覆盖页脚而不必将主体增加到100%宽度?

我已经尝试在div中设置页脚但我仍然无法找到解决问题的方法

1 个答案:

答案 0 :(得分:0)

制作100%宽度的包装纸。给你的内容95%的宽度,100%的其他一切。

<div class="wrapper">
    <header>...</header>
    <div id="content">...</div>
    <footer>...</footer>
</div>