How do you set the direction of the main axis?
In Flexbox, the direction of the main axis is set by the property:
javascript
flex-directionOptions:
javascript
flex-direction: row; /* main axis - horizontal (left to right) */
flex-direction: row-reverse; /* horizontal, but in the reverse direction */
flex-direction: column; /* main axis - vertical (top to bottom) */
flex-direction: column-reverse; /* vertical, but in the reverse direction */The main axis changes depending on the chosen value of flex-direction.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.