I’ve got 4 divs inside a parent div. To get them to appear side by side, I’ve given all 4 divs a style with float:left. The divs do appear side by side, but the parent div’s height does not grow to encompass the height of the child divs. What am I missing?
Share
After the 4 divs, you need to “cancel” the float style.
This is done through the creation of a p for example, like:
<p style="clear: both"></p>Your parent div will automatically get the right size.