Float Method
You can float elements to the left or right, but only applies to the elements that generate boxes that are not absolutely positioned. Any element that follows the floated element will flow around the floated element on the other side.
The float property may have one of the three values:
Left – The element floats on the left side of its containing block.
Right- The element floats on the right side of its containing block.
A floated element is taken out of the normal flow and shifted to the left or right as far as possible in the space available of the containing element.
Other elements normally flow around the floated items, unless they are prevented from doing so by their clear property. Elements are floated horizontally, which means that an element can only be floated left or right, not up or down.
img {float : left; }
Float Using Clear Property
The clear property specifies which sides of an element’s box other floating elements are not allowed.
.space {clear: left; }
Leave A Comment