2018-09-30 23:01:58 +01:00
---
id: 587d78ac367417b2b2512af4
title: Use the flex-direction Property to Make a Column
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/cZmWeA4'
2019-08-05 09:17:33 -07:00
forumTopicId: 301109
2018-09-30 23:01:58 +01:00
---
## Description
<section id='description'>
2020-08-31 00:12:04 -04:00
The last two challenges used the <code>flex-direction</code> property set to <code>row</code>. This property can also create a column by vertically stacking the children of a flex container.
2018-09-30 23:01:58 +01:00
</section>
## Instructions
<section id='instructions'>
2020-01-07 22:15:03 +09:00
Add the CSS property <code>flex-direction</code> to the <code>#box -container</code> element, and give it a value of <code>column</code>.
2018-09-30 23:01:58 +01:00
</section>
## Tests
<section id='tests'>
```yml
2018-10-04 14:37:37 +01:00
tests:
2018-10-20 21:02:47 +03:00
- text: The <code>#box -container</code> element should have a <code>flex-direction</code> property set to column.
2019-07-24 03:54:35 -07:00
testString: assert($('#box -container').css('flex-direction') == 'column');
2018-09-30 23:01:58 +01:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
#box -container {
display: flex;
height: 500px;
2018-10-08 01:01:53 +01:00
2018-09-30 23:01:58 +01:00
}
#box -1 {
background-color: dodgerblue;
width: 50%;
height: 50%;
}
#box -2 {
background-color: orangered;
width: 50%;
height: 50%;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
```
</div>
</section>
## Solution
<section id='solution'>
2019-04-20 11:45:18 -05:00
```html
<style>
#box -container {
display: flex;
height: 500px;
flex-direction: column;
}
#box -1 {
background-color: dodgerblue;
width: 50%;
height: 50%;
}
#box -2 {
background-color: orangered;
width: 50%;
height: 50%;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
2018-09-30 23:01:58 +01:00
```
2019-07-18 08:24:12 -07:00
2018-09-30 23:01:58 +01:00
</section>