2012-01-02 79 views
1

那么标题本身就说明了,页脚出现背后的内容,而不是页面的底部

我有希望在页面底部的页脚,而是它背后显示的内容。

你可以看到这里的问题:http://inelmo.com(我做了注脚黑色,所以你可以看到它)

HTML

<body> 
<div id="header"></div> 
    <div id="wrapper"> 
     <div id="content"> !There is php stuff echoed here! </div> 
     <div id="sidebar"></div> 
     <div id="footer"></div> 
    </div> 
</body> 

CSS

#wrapper { 
    width: 902px; 
    margin: 70px auto 0 auto; 
} 

#content { 
    width: 520px; 
    padding: 15px; 
    float: left; 
} 

#footer { 
    background: #000; 
    height: 200px; 
} 

/* Sidebar */ 
#sidebar { 
    width: 336px; 
    float: right; 
    padding: 16px 0 0 0; 
} 

回答

4

添加clear: both;到您的页脚的样式定义

#footer { 
    background: #000; 
    height: 200px; 
    clear: both; 
} 
+0

任职;)谢谢,我可以接受5分钟的答案,同时等待你能解释一下什么是“明确的”是干什么用的? – Ilja 2012-01-02 17:11:49