css principles
🚀
master the principles, create better UIs
tags & categories
showing tag
overflow
1
posts
»
0
0
1
Floaty McFloatface: How floats work
summary
Floated elements wrap text around its sides (including inline and inline-block sibling elements).
The parent of the float element does not contain it by default (the float overflows at the bottom of the parent).
Apply
clear
:
both
to a sibling element that follows the floated element.
Or
overflow
:
auto
on the parent.
Floated elements take the same x-axis as the text line where they appear, or the one after if there is not enough space.
read post 001 »