Name

clear

Synopsis

This defines the sides of an element on which no floating elements may appear. In CSS1 and CSS2, this is accomplished by automatically increasing the top margin of the cleared element. In CSS2.1, clearance space is added above the element’s top margin, but the margin itself is not altered. In either case, the end result is that the element’s top outer border edge is just below the bottom outer margin edge of a floated element on the declared side.

Values:

left | right | both | none | inherit

Initial value:

none

Applies to:

block-level elements

Inherited:

no

Computed value:

as specified

Get Cascading Style Sheets: The Definitive Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.