CSS Clear

CSS Clear

//the following example clears the float to the left;
//means that no floating elements are allowed on the left side (of the div)

div {
  clear: left;
}
  • Specifies what elements can float beside the cleared element and on which side.
  • Specifies what elements can float beside the cleared element and on which side.
  • Clear property can have one of the following values: none (allows floating elements on both sides; this is default), left (no floating elements allowed on the left side), right (no floating elements allowed on the right side), both (no floating elements allowed on either the left or the right side), inherit (the element inherits the clear value of its parent).
  • The most common way to use the clear property is after you have used a float property on an element.

Related concepts

CSS Clear

CSS Clear — Structure map

Clickable & Draggable!

CSS Clear — Related pages: