The clear property decides whether an element must sit below earlier floated elements. Without it, text and blocks can wrap beside floats. With left, right, or both, the element drops under those floats.
It applies to block-level elements (floating or not). New layouts often use Flexbox or Grid instead of floats, but clear still matters for float-based wrapping and older code.
Baseline · Widely available.
Not deprecated and not experimental. none, left, right, and both work across modern browsers and Internet Explorer. Logical values inline-start and inline-end need newer browsers (see Browser support).
Syntax
CSS Syntax
syntax.css
clear:none | left | right | both | inline-start | inline-end | initial | inherit;
The initial value is none. The property is not inherited.
Values
Property Values
Value
Description
Try it
none
Do not clear floats (default). Content may sit beside them
Float both sides again. Same blue and yellow boxes.
Clear everything.clear: both waits until left and right floats are finished.
Full-width start. The green block begins on its own line under both floats.
Common pattern. Footers and section breaks under floated media often use both.
Edge Cases & Pitfalls
If clearing seems broken, check these first.
floats
No floats means no visible effect
clear only reacts to earlier floats in the same block formatting context. Without float, every value looks the same.
parent
clear does not expand the parent
A parent that holds only floats can collapse to zero height. Use display: flow-root on the parent to contain them. clear is for later siblings.
side
left clears only left floats
clear: left ignores right floats. Use both when the next block must sit under every float.
layout
Flex and Grid do not need clear
Modern row/column layouts usually use Flexbox or Grid. Keep clear for float wrapping and legacy float layouts.
logical
inline-start follows direction
In LTR, inline-start matches left. In RTL it matches right. Prefer logical values when writing-mode and direction vary.
Compatibility
Browser Support
clear is a browser CSS property for float layout. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
clear
Classic values work everywhere, including Internet Explorer. Logical inline-start / inline-end: Chrome 118+, Edge 118+, Firefox 55+, Safari 15+.
99%Classic value support
Google Chrome1+
Full support
Mozilla Firefox1+
Full support
Apple Safari1+
Full support
Microsoft Edge12+
Full support
Opera1+
Full support
Samsung Internet1+
Full support
Internet Explorer4+
Full support (classic values)
clear (none / left / right / both)Universally supported
Bottom line: Safe for production. Prefer left / right / both for maximum reach. Use inline-start / inline-end only when you can require modern browsers. It is not a runtime API.
Remember
Key Takeaways
Role: push an element below earlier floats on chosen sides.
Common value:clear: both for a full break under all floats.
Not a clearfix: parent height needs display: flow-root (or similar).
Initial value:none. Not inherited. Needs floats above to matter.
One line: floats wrap content; clear: both starts the next block fully underneath.
Frequently Asked Questions
It moves an element down so it sits below earlier floated elements on the sides you choose (left, right, or both). It applies to floating and non-floating block-level elements.
The initial value is none. The element can sit beside floats and is not pushed below them.
float pulls an element out of normal flow so content wraps around it. clear is set on a later element to stop it from wrapping beside those floats.
No. clear moves a following element below floats. To make a parent grow around floated children, use display: flow-root (or another block formatting context) on the parent.
Use it when the next block must start fully below every left and right float above it, such as a footer or a new section under floated images.
Classic values (none, left, right, both) are Baseline Widely available and work in all major browsers, including Internet Explorer. Logical values inline-start and inline-end need newer browsers (Chrome 118+, Safari 15+, Firefox 55+). It is a browser CSS property, not a Node.js feature.