freeCodeCamp/guide/english/certifications/responsive-web-design/css-flexbox/use-the-flex-direction-prop.../index.md

330 B

title
Use the flex-direction Property to Make a Column

Use the flex-direction Property to Make a Column

To stack the child elements of your flex container on top of each other you would change the flex-direction the following way:

#main-container {
    display: flex;
    flex-direction: column;
}