What is the float property of CSS?

Submitted 3 years, 2 months ago
Ticket #347
Views 263
Language/Framework CSS
Priority Low
Status Closed

Can anyone explain in detail. Thanks

Submitted on Feb 10, 21
add a comment

1 Answer

Verified

 The CSS float property specifies whether the box should float or not. This property is used to move the image to the right or left along with the texts to be wrapped around it. It doesn't change the property of the elements used before it.

Elements are floated only horizontally. So it is possible only to float elements left or right, not up or down.

  1. A floated element may be moved as far to the left or the right as possible. Simply, it means that a floated element can display at extreme left or extreme right.
  2. The elements before the floating element will not be affected.
  3. The elements after the floating element will flow around it.
  4. If the image floated to the right, the texts flow around it, to the left and if the image floated to the left, the text flows around it, to the right.

Submitted 3 years, 2 months ago


Latest Blogs