CSS clear property

Usage

Used to tell an floated element that it should appear below any other elements on the left, right, or both sides of the parent element.

Values

  • left - the element will be positioned below all other floated elements on the left hand side of the parent element
  • right - the element will be positioned below all other floated elements on the right hand side of the parent element
  • both - the element will be positioned below all other floated elements on the both the left and right hand sides of the parent element
  • none - default

Example

Code:

#footer {
  clear: both;
}