I'm among the coutless people who are facing the same problem about adapting parent's height to the contained elements. I did some research and found similar questions, but no answer could help me, so i thought i should open a new one.
I already tried the suggestions given as answers here, and here, like adding "clearfix" as a class for the container div (in this case, the clearfix class is there in the Fiddle i created), adding a workaround-spacer, and so on. I don't have any floated element, thought, so maybe it's a different kind of problem.
The problem still remains, in both the nested divs i have in my code (#content_wrapper
doesn't adapt to #div_1
and/or div_2
, while #div_2
doesn't increase its height to the contained <ul>
.
I really hope to find a solution (maybe it's just something wrong in my code i can't de-bug).
Thanks for your attention.