The Flexible Box Layout Module, more commonly known as flexbox, is a powerful tool for building layouts with CSS. It is not quite as powerful as CSS Grid, which we’ll look at in Chapter 12, but it can solve many layout problems. Flexbox is a one-dimensional layout that can lay out elements either horizontally or vertically (but not both). An element using flexbox as its layout is referred to as a flex container , and the elements inside it are flex items .
Basic concepts
Let’s go over the basic concepts to understand flexbox.
Direction
A flex container has a direction , defined by the flex-direction property. It can be either ...