HTML & CSS Wiki

READ MORE

HTML & CSS Wiki

The clear property is used in CSS and certain HTML elements. This property specifies whether an element can be next to floating elements that precede it or must be moved down (cleared) below them. This property can be applied to both floating and non-floating elements.


Values[]

  • none - Element is not moved down to clear past floating elements.
  • left - Element is moved down to clear past left floats.
  • right - Element is moved down to clear past right floats.
  • both - Element is moved down to clear past both left and right floats.


HTML example:

TEXT
<br style="clear:both;" />
Cleared text.


CSS example:

br {
    clear:both;
}