Style clear Property

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP







<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->




Style clear Property


❮ Style Object



Example


Prohibit floating objects on the left side of the text in a <p> element:



document.getElementById("myP").style.clear = "left";

Try it Yourself »


Definition and Usage



The clear property sets or returns the position of the element relative to
floating objects.



Browser Support














Property
clear Yes Yes Yes Yes Yes

Syntax


Return the clear property:



object.style.clear

Set the clear property:



object.style.clear = "none|left|right|both|initial|inherit"

Property Values
















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




<!--
mid_content, all: [300,250][336,280][728,90][970,250][970,90][320,50][468,60]
-->




Technical Details








Default Value: none
Return Value: A String, representing the position of an element relative to floating objects
CSS Version CSS1

More Examples



Example


Return the clear property:



alert(document.getElementById("myP").style.clear);

Try it Yourself »


Related Pages


CSS tutorial: CSS Float


CSS reference: clear property




❮ Style Object

Popular posts from this blog

Malaysia to Papua New Guinea by motorcycle?

.name

List of Bhojpuri films