sarunathan
sarunathan

Reputation: 13

auto increasing height issue for nested divs

I want to increase the size of the outter div when the height of the inner div increases.

height:auto seems to be working only when the contents are added its expanding.. it doesnt seems to be expanding when the inside div height is more.Is there any solution for this in css?

Upvotes: 1

Views: 761

Answers (1)

Waiting for Dev...
Waiting for Dev...

Reputation: 13029

Try to put overflow: hidden in the parent div or otherwise float it. Surely you have your inner div floated and then parent div doesn't consider it to expand its height. If this is the case, both solutions should work.

Upvotes: 1

Related Questions