Specifies the horizontal alignment of the object.
With this property you can enable floating on the left or right side of an element. If float is set, the display property is ignored and the element is shown as a block-level element. Block element means that by default the entire line where the element appears is reserved. With the float property you can specify which side of the element HTML content may appear on.
One of the following values:
|Takes the value of this property from the computed style of the parent element.|
|Surrounding content flows to the right of the element.|
|Default. The element is not floated.|
|Surrounding content flows to the left of the element.|
Example HTML code 1:
This example illustrates the use of the float property:
Did you find this example helpful?
Supported by tags:
User Contributed Comments