Using CSS float Property
The default value of float css property is none
Possible values are:
left - Used for floating the element on the left side of its container block
right - Used for floating the element on the right side of its container block
none - No Float
Float css property doesn’t take the inherited values from its parent elements.
When an element is floated, It is shifted to the left or right until it touches the edge of it’s containing box or another floated element.
Floated elements continue to take the left or right position, until there is space available for it, if not, it will wrap in next line.
The elements other then floated elements, will take the position from the left of containing element inlining with floated elements.
Clearing Float
If we do not want the elements to position inline with floated elements, we need to clear the float.
for example, suppose there is a h2 element after that, following style should be given
h2.nextElement { clear:both }