Computing Magazine

Float and Clear Properties

Posted on the 23 February 2014 by Savio Menezes

Float property Float property is used to align element either extreme left or right. Its values are left, right or none. Float property can be used to any element to whom box model applies.
div{float : right;}
Clear property By default subsequent elements after the element using float property will fill the space left by that element. If you use clear then subsequent element will be after bottom margin of floated element. Values of clear property are left (use when float's value is left), right (use when float's value is right) and both (can be used when float's value is left or right). 
div{clear : right;}
To view an example on float and clear properties click here.

Back to Featured Articles on Logo Paperblog

Magazines