0
我有这样的代码 代码:IE7浮动DIV高度
<div id="container">
<div id="products_content">
<div id="products_page_header">
<div id="products_page">
<div class="post">
<div class="entrytext">
some text
</div>
</div>
</div>
</div>
</div>
<div id="clear">
</div>
<div id="siteinfo">
<p>
some content
</p>
</div>
</div>
这个CSS:
代码:
div#container {
margin: 0 auto;
width: 960px;
height: auto;
border-left: thin solid #6b5c57;
border-right: thin solid #6b5c57;
}
div#products_page_header {
width: 960px;
height: 50px;
background-image: url(images/products_page_header.png);
background-repeat: no-repeat;
margin: 10px 0 0 0;
}
div#products_page {
width: 950px;
float: right;
margin: 50px 0 0 0;
}
div.post {
float: right;
border: 1px solid #6b5c57;
width: 200px;
height: 350px;
margin: 10px;
}
div#siteinfo {
height: 280px;
position:relative;
background-image: url(images/footer.jpg);
}
的问题是它的工作除了IE7所有新的浏览器! 产品容器的高度不会工作和页脚div重叠! 我该怎么办?
你可以建议的方式来解决这个问题? – kfiroo 2010-04-18 09:23:49
@ kfiroo,如果你想要一个父元素展开来包含其浮动的孩子,它不能有一个固定的高度...将其设置为自动.. – 2010-04-18 12:48:54
谢谢,工作。 – kfiroo 2010-04-19 10:13:53