Main axis
noun
say it: “MAYN AK-sis” /meɪn ˈæksɪs/
The direction flex items line up in: side to side for a row, top to bottom for a column. justify-content spreads items along it.
What is the main axis in Flexbox?
The main axis is the direction items flow in: across for a row, down for a column. justify-content works along it.
.row { display: flex; flex-direction: row; justify-content: space-between; } /* main axis: left to right */
In a sentence
- “In a row, the main axis runs left to right, so space-between pushed the logo and the cart apart.”
Level: Journeyman · More CSS terms at this level
Updated