Prohibit floating objects on the left side of the text in a <p> element:
The clear property sets or returns the position of the element relative to floating objects.
The clear property is supported in all major browsers.
Return the clear property:
Set the clear property:
Value | Description |
---|---|
none | Allows floating objects on both sides of the element. This is default |
left | No floating objects allowed on the left side of the element |
right | No floating objects allowed on the right side of the element |
both | No floating objects allowed on either the left or right side of the element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | none |
---|---|
Return Value: | A String, representing the position of an element relative to floating objects |
CSS Version | CSS1 |
Return the clear property:
CSS tutorial: CSS Float
CSS reference: clear property