property
clear — CSS reference
Adds clearance as needed to move an applicable box below earlier floats on selected sides within its BFC. Initial none; not inherited. It does not clear unrelated floats across independent formatting contexts. Clear both is useful for a footer after floated content.
Formal Syntax & Structure
css syntaxcss
none | left | right | both | inline-start | inline-endWorking 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}#a{float:left;width:80px;height:60px;background:#72b7a5}#b{clear:both;height:20px}</style><body><div id="p"><div class="tile" id="a"></div><div id="b">Following block</div></div></body></html>