Make outer div expand with inner div


I have two divs, one inside the other. I make the inner div have a height of 100px. The problem is that the outer div does not expand to 100px.  Instead it stays at 0px height.


In order for the outer div to expand with the inner div, you must have the following:

  1. Don’t state a height
  2. Enclose elements with Float
  3. Don’t use absolute positioning

keywords: css expand outer div

Tagged with:

Leave a Reply

Your email address will not be published. Required fields are marked *