The normal flow of element rendering can be changed if there are floating objects. The floating objects can be defined using HTML code with align attribute for the HTML element that accept it or by css code using the float property.
The possible values are
Properties | Description |
---|---|
none | generates a box that is not floated. |
right | generates a box that is floated to the right |
left | generates a box that is floated to the left |
img{ float: right } /*makes all images to float on right*/ ul{ float: left } /*makes all unordered lists to float on left*/
When float object is met, the following things happen.
If many adjacent objects are floated in the same direction, a stack of floating objects can appear. The floating objects are rendered on the same line one after another.