HOME
          About US
          Contact Us

CSS Image Float

Chapter - 18 : Display, Visibility Float and Transparency (CSS Image Float): (Page 3/4)


(Cotinued from previous page)

ii) Float Right: img { float:right; } In this case, following text will flows around it from the left side and the image will be at right side.
In HTML the command will remains the same, but the image will float to the right of text

Output:

CSS Float

iii) No Float: If at any place the float element is present, but you do not want to use this property, then use clear float command.
If some text are to be written and it is not desirable that these text flow around the float element then following command is used to Turn Off Float

Command: .text { clear:both;}

iv) Float Margins: Some time it is required that the element floats, but not very close to the other element. For this margin can be defined, so that the elements are not very close to the floating element.

img { float:right; margin:5px}
NOTE : In case of more than one float element is present at a time, then they will adjust themselves in the minimum space.



(Cont......... to next page (Pg-4))

CSS Image Float © funandhobby.com (CSS Image Float)