Style cssFloat Property
Style cssFloat Property
The cssFloat property is used to either set or return the horizontal alignment of an element. We use css word before it because the float is a reserved keyword in javascript. If available space is less then the item will jump to the next line.
Syntax:-
Its syntax is:- object.style.cssFloat OR object.style.cssFloat = left|right|none|initial|inherit
Return:-
Its return is:- string having horizontal alignment of an element
Further Explanation:-
Value | Description |
---|---|
none | The element is not floated. |
left | The element will float to left in parent element |
right | The element will float to right in parent element |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |