Я пытаюсь, чтобы нижняя колонтитула расширялась в высоту, чтобы соответствовать своим детям, но им не повезло. Любые мысли о том, как я могу это достичь?
<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;
}
Вот обновленный css. Я добавил цвет фона в фрейм-оболочку в качестве теста, чтобы показать высоту 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: 0px 0px 0px 0px;
height: auto;
background-color:#666666;
}
<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 class="clear"></div>
</div>
<style>
#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;
}
.clear
{
clear: both;
}
</style>
используйте этот код
Вы можете добавить display: inline-block;
к #footer
Пример: http://jsfiddle.net/RE997/