If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
The property can be used just to the right or left u sing the property float. So the box with the content floats on the right either the left.
How can we do it?
The HTML code looks like this :
To have the exact result and so your picture start to float to the left and the text surround it, you have to define the width of the box which is around the picture and thereafter set the property float to left:
Another example :
Floats are used in columns in documents. To have one you just have to make your columns in the HTML code with <div> as :
The desired width of the columns :
Property clear
The clear property is being used to control the subsequent elements of floated elements in a document that will be behave.
The subsequent elements are moved to fill the available space which will be freed when a box is floated to a side. Clear property assume the values left, right, both, none.
For not having text from floating up next to a picture we can add the following CSS code:






