a. Float CSS Property Tutorial: None, Left or Right
Float CSS style property specifies which side of the block the content would be. Its default value is none. None implies that the the content would would in the same position as the text. Float can have left or right values. The left value would put the content to the left and right to the right. Float is commonly used with images.
Example:
|
CSS Code: .floatright { float: right; } |
|
HTML Code: <p> I'll put something to the right <img class="floatright" src="images/image.gif" alt="" width="100" height="100"> IMAGE ON RIGHT </a> </p>
|
The output would be:
|
I'll put somthing to the right
|
IMAGE |
Similary, we can put images to the left also.