DEV Community

front_end_shifu_2022
front_end_shifu_2022

Posted on

Explaining CSS float

One of the basic and most useful property that every Web designer should learn is float property.
it is most commonly used for floating text around the image or creating two column layouts. The float property can cause a lot of frustration and confusion of it's not clearly understood.
So I will try to clear your confusion.

Float property:
Float property specifies how the element should float.
with the use of float property the element can be placed left or right.

The float property possible values area:
1 Left:
The element float to the left side of its
containing block.
2 Right:
The element float to the right side of its
containing block.
3 None:
The element does not float.

when the element has float set to it . it moves left or right until it touches edge of the container or any other floated element.

That's all for now .I'll share more in my up-coming posts.
Thank you for reading!

Top comments (0)