float

The float property specifies whether a box should float to the left, right, or not at all.

float: left | right | none | inherit
Initial: none
Applies To: all elements
Inherited: no
Percentages: NA
Media: visual

Values

Δ

float: value;
 
Value: Description:
inherit Takes the same computed value as the property for the element's parent
left Floated to the left while content flows on the right starting at the top
none Not floated
right Floated to the right while content flows on the left starting at the top

DOM

Δ

[window.]document.getElementById("element-id").style.cssFloat   = "float";
[window.]document.getElementById("element-id").style.styleFloat = "float";

cssFloat is used by Chrome, Firefox, Opera, and Safari.

styleFloat is used by Internet Explorer and Opera.

Example | Values | left

Δ

Example | Values | none

Δ

Example | Values | right

Δ

Example | DOM

Δ

References

Δ