How can I make the height of the parent div increase as the height of the child div increases?
Such as
Use float, clear float
Use float Well, clear float
Reference
<div style="background:red;"> <div style="display:inline-block;">aaaaaa</div><div style="display:inline-block;">cccc<br>bbbbb</div> </div> <br><div style="background:red;"> <div>aaaaaa</div><div style="float:right;">cccc<br>bbbbb</div> <div style="clear:both;"></div> </div>
Use float, clear float