What is flexbox?
- The flexbox makes it easier to design a flexible responsive layout of a web page.
- It is used to create a flexible structure without using float or positioning.
- flex display property is used to make flex display.
This will be our boilerplate:
index.html
Flex Container Properties
i) flex-direction: This flexbox property is used to specify the direction of the flexbox container's item.
ii) flex-wrap: This property specifies whether the flex items should wrap or not.
iii) flex-flow: This is a shorthand property for flex-direction and flex-wrap.
iv) justify-content: This property is used to horizontally aligns the flex items.
v) align-items: This property is used to vertically align the flex items.
vi) align-content: This property is used to align the flex lines.
Flex Item Properties
The direct child elements of a flex container are flex items.
i) order: The order property specifies the order of the flex items.
ii) flex-grow: This property specifies how much a flex item will grow relative to the rest of the flex items.
iii) flex-shrink: This property specifies how much a flex item will shrink relative to the rest of the flex items.
iv) flex-basis: The flex-basis property specifies the initial length of a flex item.
v) align-self: This property specifies the alignment for the selected item inside the flexible container.
Using Flexbox Properties
Output: