CSS Flexbox: flex-direction

The flex-direction property controls the directions of main axis of a flex container, with the cross axis being perpendicular to it. This property also allows flex items to be rearranged in either the reverse or the default order. The flex-direction property is applied to the flex parent, i.e. the element with display: flex or display: inline-flex.”


flex-direction: row;
flex-direction: row-reverse;
flex-direction: column;
flex-direction: column-reverse;

See the Pen Flexbox: flex-direction by majadc (@majadc) on CodePen.



Posted in CSS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.