I have parent div which has no height, there is also nested another child div with position absolute inside it. Child div has 652px of height. But I cannot get the same height in parent div. I tried to play with clear: both, overflow.
Here is the code:
HTML
<div class="content">
<div class="container">
some other elements whose height is 652px...
</div>
</div>
CSS
.content {
position: relative;
}
.container {
position: absolute;
width: 100%;
max-width: 1160px;
margin: 0 auto;
padding: 120px 0;
}
Content div's height is 0. Container div's height is 652px. How to make content div's height the same as container div's height?