Properties
CSS
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.
