CSS Float Explained Part 1

preview_player
Показать описание
A float property allows you to take an element in normal flow and place it as far to the left or right of the containing element.
When you use the float property you should use the width property to indicate how wide the floated element should be . If you do not the box might take the full width of the containing element.

Float can be used to place elements or boxes next to each other.
We use div element to create multiple columns with floats. The following properties are used to position columns next to each other.
They include width –which sets the width of columns , float – which positions the columns next to each other and margin which creates a gap between the columns.

Sometimes a container containing floated elements height might be treated as if they are zero or 1px . To solve this problem , we use two rules with the containing element.
The overflow property is given a value of auto andthe width property is set .

First steps.
Рекомендации по теме
Комментарии
Автор

simply awesome. there's no other way to describe this tutorial.

pging
Автор

Thank you so much I was having trouble but all I need to add was margin for both floated objects

InfoBinger
Автор

Keep doing bro I loved your voice and the way you explained

odeefannoopost