2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Use the flex-direction Property to Make a Column
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Use the flex-direction Property to Make a Column
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
## Solutions
|
|
|
|
|
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
2018-10-12 15:37:13 -04:00
|
|
|
|
|
|
|
To stack the child elements of your flex container on top of each other you would change the <i>flex-direction</i> the following way:
|
|
|
|
|
|
|
|
```CSS
|
|
|
|
#main-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
```
|
2019-07-24 00:59:27 -07:00
|
|
|
</details>
|