0

I published a simple example on jsbin. And I do not understand why The blue box does not surround the child elements if the childs have a float:left.

http://jsbin.com/saluxapiti/1/edit?html,css,js,output

  • 1
    - http://stackoverflow.com/questions/2442934/container-div-ignores-height-of-floated-elements - http://stackoverflow.com/questions/218760/how-do-you-keep-parents-of-floated-elements-from-collapsing - http://stackoverflow.com/questions/4604005/how-to-make-a-div-grow-in-height-while-having-floats-inside - http://stackoverflow.com/questions/16568272/why-doesnt-the-height-of-a-container-element-increase-if-it-contains-floated-el - ... – Fabrizio Calderan Feb 09 '16 at 13:06

2 Answers2

0

When you set property to float.It takes your element over html surface.Looks like an air baloon.

0

Summarizing what this page states:

Elements after a floating element will flow around it; therefore the border of the parent class is flowing around the floated child.