<commit_before>---
id: 587d78ab367417b2b2512af0
title: 'Use display: flex to Position Two Boxes'
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/cgz3QS7'
---

## Description
<section id='description'>
This section uses alternating challenge styles to show how to use CSS to position elements in a flexible way. First, a challenge will explain theory, then a practical challenge using a simple tweet component will apply the flexbox concept.
Placing the CSS property <code>display: flex;</code> on an element allows you to use other flex properties to build a responsive page.
</section>

## Instructions
<section id='instructions'>
Add the CSS property <code>display</code> to <code>#box-container</code> and set its value to flex.
</section>

## Tests
<section id='tests'>

```yml
tests:
  - text: <code>#box-container</code> should have the <code>display</code> property set to a value of flex.
    testString: assert($('#box-container').css('display') == 'flex', '<code>#box-container</code> should have the <code>display</code> property set to a value of flex.');

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='html-seed'>

```html
<style>
  #box-container {
    height: 500px;

  }

  #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'>

```js
// solution required
```
</section>
<commit_msg>Small change: remove unintentional whitespace (#34418)<commit_after>---
id: 587d78ab367417b2b2512af0
title: 'Use display: flex to Position Two Boxes'
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVaDAv/cgz3QS7'
---

## Description
<section id='description'>
This section uses alternating challenge styles to show how to use CSS to position elements in a flexible way. First, a challenge will explain theory, then a practical challenge using a simple tweet component will apply the flexbox concept.
Placing the CSS property <code>display: flex;</code> on an element allows you to use other flex properties to build a responsive page.
</section>

## Instructions
<section id='instructions'>
Add the CSS property <code>display</code> to <code>#box-container</code> and set its value to flex.
</section>

## Tests
<section id='tests'>

```yml
tests:
  - text: <code>#box-container</code> should have the <code>display</code> property set to a value of flex.
    testString: assert($('#box-container').css('display') == 'flex', '<code>#box-container</code> should have the <code>display</code> property set to a value of flex.');

```

</section>

## Challenge Seed
<section id='challengeSeed'>

<div id='html-seed'>

```html
<style>
  #box-container {
    height: 500px;

  }

  #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'>

```js
// solution required
```
</section>

{'fraction_non_alphanumeric': 0.15251620870639085, 'fraction_numerical': 0.02315529484408768, 'mean_word_length': 4.159235668789809, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5457760', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1030, 'n_words': 349}