Style clear Property

Style clear Property


Style clear Property
It sets whether an element must be moved below (cleared) floating elements that precede it. It is used to specify which side of floating elements are not allowed to float. 
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
 
property
 
chrome
 
firefox
 
microsoft edge
 
Opera
 
clear
 
57.0
 
53.0
 
79.0
 
44.0
Syntax
clear: none|left|right|both|initial|inherit;
Example
Output
Property Values
 
Value
 
Description
 
none
 
Default. The element is not pushed below left or right floated elements
 
left
 
The element is pushed below left 
floated elements
 
right
 
The element is pushed below right floated elements
 
both
 
The element is pushed below both left and right floated elements
 
initial
 
Set this property to its default value.
 
inherit
 
Inherits this property from its parent element.
 
Technical Details
 
Default value:
 
None
 
Version:
 
CSS1
 
inherited
 
No
 
Animatable
 
No
 
JavaScript syntax:
 
object.style.clear="both"