CSS Flexbox model
Flexbox ---------- Complex things like flexible grid layouts are so hard using tables, floats, inline-blocks. Flexbox consists of Flex containers and flex items. Flex container: display property set as flex or inline-flex. Flex Item: Every child of flex container. Everything outside a Flex Container and inside a Flex Item is rendered as usual. In short, Flexbox defines how Flex Items are laid out inside of Flex Containers. Flex Lines Flex Items are positioned inside a Flex Container along a Flex Line. By default there is only one Flex Line per Flex Container. The Main Axis and the Cross Axis To abstract over the writing-mode, Flexbox uses the concepts of the Main Axis and the Cross Axis. Flex Lines follow the Main Axis. The Cross Axis is perpendicular to the Main Axis. The names for the starting points, ending points, and directions of each axis are as follows: Main Start Main End Main Direction (sometimes called the Flow Direction) Cross Start Cross End Cr...