The float property specifies whether or not a box (an element) should float.Absolutely positioned elements ignores the float property!
Or
Elements are floated horizontally, this means that an element can only be floated left or right, not up or down.A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.The elements after the floating element will flow around it.The elements before the floating element will not be affected. If an image is floated to the right, a following text flows around it, to the left:
Syntax: float: none|left|right|initial|inherit;
Or
Elements are floated horizontally, this means that an element can only be floated left or right, not up or down.A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.The elements after the floating element will flow around it.The elements before the floating element will not be affected. If an image is floated to the right, a following text flows around it, to the left:
Syntax: float: none|left|right|initial|inherit;
<!DOCTYPE html> <html> <head>
<style> img { float:right; } </style> </head> <body> <p>In the paragraph below, we have added an image with style <b>float:right</b>. The result is that the image will float to the right in the paragraph.</p> <p> <img src="logocss.gif" width="95" height="84" /> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> </body> </html>
<style> img { float:right; } </style> </head> <body> <p>In the paragraph below, we have added an image with style <b>float:right</b>. The result is that the image will float to the right in the paragraph.</p> <p> <img src="logocss.gif" width="95" height="84" /> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </p> </body> </html>
Comment