title: How to display 2 columns per row using flexbox
body: <p>I'm trying to display 2 columns every row but I can't seem to get it right at the moment.</p>
  
  <p>What i'm trying to replicate is this:
  <a href="https://i.stack.imgur.com/UymXT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UymXT.png" alt="what i&#39;m trying to achieve"></a></p>
  
  <p>but i'm not sure on how to handle this with using flexbox</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.flex {
    display: flex;
    flex-direction: row;
    flex-basis: 100%;
    flex: 1;
  }
  
  .box {
    padding: 20px;
    border: 1px solid black;
    width: 100px;
    height: 100px;
    margin: 10px;
  }
  
  .red {
    background-color: red;
  }
  
  .yellow {
    background-color: yellow;
  }
  
  .blue {
    background-color: blue;
  }
  
  .green {
    background-color: green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flex"&gt;
    &lt;div class="box green"&gt;positive 1&lt;/div&gt;
    &lt;div class="box yellow"&gt;positive 2&lt;/div&gt;
    &lt;div class="box blue"&gt;positive 3&lt;/div&gt;
    &lt;div class="box red"&gt;negative 1&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/1a9qLx5w/" rel="nofollow noreferrer">https://jsfiddle.net/1a9qLx5w/</a></p>