2009-09-29 61 views
0

再次我与我的div =( 我有这样的:2的div位置

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

    <div id="content"></div> 
</div> 
<div id="footer"></div> 

和css:

#body { width: 100%; margin 0 auto; } 
#content { position: absolute; height: 200px; width: 100%; } 
#footer { height: 63px; clear:both; } 

现在的结果是: 内容分度下的文字多的文本和页脚。

我怎样才能让我的页脚下的所有内容区域?

+0

边注:自动保证金是无用的,如果宽度为100%。 – DisgruntledGoat 2009-09-29 23:43:25

回答

0

我encou几次处理了这种情况。我一直在使用sticky footers。它与几个浏览器广泛兼容,似乎工作。

0

如果你使用这个造型,你会看到(红色)#内容下的(蓝色)#footer的按照您的要求:

#body {width: 600px; margin 0 auto; } 
#content {position: relative; height: 200px; width: 600px; background-color: red; } 
#footer {height: 63px; clear:both; width: 600px; background-color: blue; } 
+0

它没有帮助:( – Ockonal 2009-09-29 18:00:37

+0

只是修改了答案。这个测试和工作:) – 2009-09-29 18:09:01

+0

它真的不适合我。 – Ockonal 2009-09-29 18:35:18