I can’t seem to auto-grow my parent div
’s height based on its floating child div
s. All the children are floating, to take up space horizontally, an
Adding the overflow
css property on the parent element will fix the issue (no need for an empty & ugly div element to clear the float) :
.parentelement {
overflow:auto;
display: block;
width: 100%;
}
I added the display and width properties because some browsers will need theses properties to be defined.