CSS Layout - float and clear
float is utilized with pictures, however it is additionally valuable when working with layouts.
float property indicates regardless of whether a component ought to float.
clear property is utilized to control the conduct of drifting elements.
The values for the buoy property are left, right, and none.
The drift Property
In its most straightforward use, the
float property can be utilized to fold message over images.
The following precedent indicates that a picture should buoy to one side in a text:
edge: 0 15px 15px;
The clear Property
clear property is utilized to control the conduct of skimming
Elements after a skimming component will stream around it. To keep away from this, utilization the
clear property indicates on which sides of a component
skimming components are not permitted to float:
The clearfix Hack - flood: auto;
If a component is taller than the component containing it, and it is skimmed, it will flood outside of its container.
Then we can include
overflow: auto; to the containing component to fix