I have a DIV container in which I must dynamically generate other div and I want that the container automatically expand in its height so the children's div don't go out of its bottom border.

How can I do that?


2 answers


That's the appropriate behaviour for a parent container, unless the children are floated, in which case setting overflow:hidden; on the parent is one way of getting it to wrap around the children.

Answered almost 9 years ago by Tony Crockford
  • Very good it works thanks a lot! joshua almost 9 years ago

if you use height:auto; ?

Answered almost 9 years ago by Sotiris