I have a parent div that is a specified width and height. If I have a child div inside that, that is outside the boundaries, is there a way to make the parent div adjust size to fit the child div?
EX:
<div style="width:500px; height:500px; position:relative;">
<div style="width:300px; height:300px; position:absolute; top:250px;">
Some Content
</div>
</div>
As you can see in this example the child div would overflow the parent div on the bottom by 50px. I do not want to use overflow:auto because that just creates scrollbars. I really want the parent div to adjust and add 50px in height to compensate for the child div.