concept
block-formatting-context — CSS reference
A BFC governs block and float interactions. An independent BFC contains its internal floats for auto-height sizing, prevents child margins from collapsing across its boundary and avoids overlap with external floats in the same surrounding BFC. It is not necessarily a stacking context.
Formal Syntax & Structure
css syntaxcss
display: flow-root; /* explicit BFC */Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flow layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{font:16px/20px sans-serif} #p{width:240px;background:#e6eef2} .tile{background:#c2e4d5} #a,#b{box-sizing:content-box}#p{display:flow-root}#a{float:left;width:80px;height:60px;background:#72b7a5}</style><body><div id="p"><div class="tile" id="a"></div></div><div id="b">Next</div></body></html>