CSS clear Property

Description

The clear property defines the sides of the element that should not float. It turns off the floating to that specific side.

Initial value
auto
Applies to
Block-level elements
Inherited
No
Media
Visual
Computed value
As specified
Animatable
No
CSS Version
CSS1, CSS2, CSS3
JavaScript syntax
object.style.clear

Syntax

clear: none | left | right | both

Values

  • noneThe element is not moved down to clear past floating elements.
  • leftThe element is moved down to clear past left floats.
  • rightThe element is moved down to clear past right floats.
  • bothThe element is moved down to clear past both left and right floats.

Example

.clear {
  clear:both;
}

Give it a Try

Click the button below to experiment with this property.

Give it a Try!

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
412113.51
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
118410.11Yes