CSS #5 ~ Floats

HJ's Coding Journey·2021년 8월 26일

[Learn] HTML/CSS

목록 보기

What are Floats?

Float is a CSS property used to place an element on either the left or the right side of a container which allows text and inline elements to wrap around it. Just like 'absolute positioning', using float removes the element from the normal flow of the page, but still remains as part of the flow at the same time. We can use float to position the content to stack them either to the left or to the right.

The most important concept to take away from floats is that the contents are set into the page such that all other contents get wrapped around them. On the other hand, elements with 'absolute positioning' property does not get affected by other elements whether they make contact with each other or not.

NOTE: Although float has its own use-case, it is considered to be an old CSS method. Currently, developers use flexbox and CSS grid.

Improving Everyday

1개의 댓글

2022년 12월 15일

Floats are one of the most powerful features of CSS. They have been used for many years and we still see websites built with floats on every day. Here you check this handyman wellington and get more new steps for home handyman services. This tutorial will walk you through a few basic to advanced float uses, as well as guidebook a variety of use cases that range from developing responsive designs to creating layouts that convey information effectively.

답글 달기