jquery - How to adjust division inside division with min-height? -
i have created following html code:
<div id="wrapper"> <section id="main-body"> <section id="post-section"> </section> </section> </div> css
#wrapper { margin:0 auto; width:1000px; min-height:600px; } #main-body { width:100%; min-height:1000px; border:1px solid black; border-radius:10px; } #post-section { float:left; width:800px; min-height:1100px; border-right:1px solid gray; background:plum; } problem due min-height of "main-body" size of wrapper increasing due "post-section" size of "wrapper" , "main-body" not increasing.
you need 'clearfix'. add css rule:
main-body:after { content: "."; height: 0; display: block; clear: left; } here fiddle: http://jsfiddle.net/em77f/2/
Comments
Post a Comment