What is FlexBox and Why do we need to know ?
- FlexBox allows us to align to one another in different directions and order.
- The main idea of flexBox is to make use of available space by expanding and shrinking the elements.
- FlexBox replaces Floats using less and more logical and readable Code.
- FlexBox completely changes the way we build one Dimensional Layouts.
Things we need to know :
- When we set the
display: flex
, the container becomes the flex container.
- The container which hold the items are called as flex items and the items have two direction one is cross axis which is Y-Direction and main axis which is X-Direction.
- Now Let's take a look at some properties which should be applied for container and items. Make sure you understand all these things before you start to use it on your site / Project.
Must Know