我试图让页脚包装高度扩大到匹配它的孩子,但即时通讯没有运气。有关我如何实现这一目标的任何想法?不能让孩子高自动调整到父母
<div id="footer">
<div id="footer-wrapper">
<div style="float:left; width:160px">
<strong>TITLE</strong><br/>
<a href="#">links</a><br/>
<a href="#">links</a><br/>
<a href="#">links</a><br/>
</div>
<div style="float:left; width:160px">
<strong>TITLE</strong><br/>
<a href="#">links</a><br/>
<a href="#">links</a><br/>
<a href="#">links</a><br/>
</div>
</div>
</div>
#footer {
width: 100%;
background: transparent url(../images/bgfooter.jpg) no-repeat top center;
background-color: #363732;
border-top: 5px solid #2c2d29;
clear: both;/*Clears all columns and sets the footer at the bottom*/
}
/*--Set footer width and center--*/
#footer-wrapper {
color: #9c9b9a;
width:800px;
margin: 0 auto;
padding: 10px 0px 10px 0px;
height: auto;
}
作为测试显示,当我添加不同的背景颜色,以脚注的方式包装,而不是补到孩子们的身高只是从上往下填充约10px。 – Ruf1
,因为您给了页脚包装div的填充20px –
我删除了填充,然后根本不显示背景颜色。 – Ruf1