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?

Thanks.

2 answers

2
points

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 over 8 years ago by Tony Crockford
  • Very good it works thanks a lot! joshua over 8 years ago
0
points

if you use height:auto; ?

Answered over 8 years ago by Sotiris