title: How to align cards in html?
body: <p>i have a container which contain some cards, I want each card to start at left border of container and end at right border , like the below code.</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-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;style&gt;
    .container {
      display: flex;
      justify-content: space-between;
  flex-direction: row;
  flex-wrap: wrap;
    }
     .card{
   border:1px solid black;
  }
  &lt;/style&gt;
  
  &lt;body&gt;
    &lt;div class="container"&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="card"&gt;
        &lt;h2&gt;I'm a card&lt;/h2&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but last 2 elements have too much space between them, how can I remove it??</p>
  
  <p>I have tried adding <code>margin-left/right</code> to behave like I want but the corner cards don't touch the border. any help??</p>
  
  <p>Edit: here is what i expect and<a href="https://i.stack.imgur.com/vxlcy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vxlcy.png" alt="expected Result"></a></p>
  
  <p>and what I get <a href="https://i.stack.imgur.com/3Fe9q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Fe9q.png" alt="what i&#39;am getting"></a></p>