1. Home
  2. Computing & Technology
  3. Web Design / HTML

clear

By Jennifer Kyrnin, About.com

clear Description:

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

clear in CSS Versions:

clear Syntax:

clear: none | left | right | both | inherit

  • none
    Floating elements are allowed on both sides.
  • left
    Floating elements are not allowed on the left.
  • right
    Floating elements are not allowed on the right.
  • both
    Floating elements are not allowed on either side.
  • inherit
    The element should have the same clear setting as the parent.

clear Initial Value:

none

clear Applies To:

All elements.

clear Inheritance:

This property is not inherited.

clear Browser Support:

clear Examples:

clear a right floating image

<p>
<img src="image.gif" alt="image" style="float: right;" />
This text will flow on the left side of the image.<br style="clear:right;" />
This text will display below the image.
</p>

clear Special Notes:

  • The cleared element will display directly below the floated element unless there are other layout styles in place.

More clear Information:

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: clear

©2008 About.com, a part of The New York Times Company.

All rights reserved.