CSS height: auto doesn't work with my wrapper div

I was hoping that someone could take a look at my site and tell me what could be here. The problem I am facing is that the div #bodyWrap does not automatically stretch to the height of one of these children, #contentWrap. #contentWrap is stretched to fill all the content on this page, but it does not reach the parent, #bodyWrap. Thanks in advance for your understanding.

http://www.jacobsmits.com/placeholderRX/index.html

+5
source share
2 answers

You should add a sharper div before the closing containers:

<div style="clear:both;"></div>

Floating elements do not affect the height of the container ... coz it floats;).

Live: http://jsfiddle.net/LBH5h/

:

<div id="content">
  <!-- floating child --> <div style="float:left;"><!-- floating child content --></div>

  <div style="clear:both;"></div>
</div>
+19

- , .

  • - (1000px)
  • ,
  • : both; .
  • , div. , -.
+4

All Articles