title: how to remove white space to the right of flexbox container?
body: <p>I'm trying to use flexbox to create a responsive layout of a product list page but this code leaves a lot of whitespace to the right of the page, ive tried using justify-content:space-between but that did not work as well. Adding overflow:hidden to .container class did nothing as well.</p>
  <p>edit:someone said it works fine on their end but this is how
  <a href="https://i.stack.imgur.com/6kbcM.png" rel="nofollow noreferrer">my screen</a> looks
  <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>*{
      margin:0;
      padding: 0;
      box-sizing: border-box;
      text-transform: capitalize;
      text-decoration: none;
      transition: all .2s linear;
  } 
  
  body{
      overflow-x: hidden;  
  } 
  
  .container{
      min-height: 100vh;
      display:flex;
      flex-direction: row;
      justify-content:center;
      flex-wrap: wrap;
      padding: 40px 0;  
  
  }
  
  .card{
      height:500px;
      width:280px ;
      overflow: hidden;
      position: relative;
      align-self: center;
      margin: 40px;
  }
  
  .card img{
      width: 100%;
      height: 80%;
      object-fit: cover;
  }
  
  .card .info
    {
      text-align: center;
      line-height: 25px;
    }
  
  .card .info .stars i
  {
       color: gold;
       padding: 10px 0;
  
  }
  
  .card .info .price{
      font-size: 20px;
      color:#f00333;
      letter-spacing: 1px;
  }
  
  .card .info h3{
      color: #333;
      padding-top: 5px;
  
  }
  
  .card .discount
  {
      position: absolute;
      top:15px;
      left:15px;
      height:50px;
      width:50px;
      display: grid;
      background-color: rgba(255, 0, 0, 0.6);
      color:#fff;
      font-weight: bold;
      border-radius: 50%;
      text-align: center;
      line-height: 50px;
  
  
  }
  
  .card .panel
  {
      position: absolute;
      top:15px;
      right: -50%;
      width: 45px;
      background: rgba(255, 255, 255, 0.644);
      display: flex;
      align-items: center;
      flex-flow: column;
  
  }
  
  .card:hover .panel{
      right: 15px;
      opacity: 1;
  }
  
  .card button
  {
      position: absolute;
      left:50%;
      bottom: 0%;
      height: 40px;
      width: 140px;
      border: none;
      outline:none;
      background: rgba(0,0,0,0.6);
      color:#fff;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transform: translateX(-50%);
      opacity: 0;
      transition-delay: .2s;
  }
  
  .card:hover button{
      opacity: 1;
      bottom: 25%;
  }
  
  .card button:hover{
      background: (255,0,0,0.6);
  }
  
  .card .panel a{
      font-size: 20px;
      color: #333;
      margin: 15px 0;
  }
  
  .card .panel a:hover{
      color: rgba(255,0,0,0.9);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"&gt;
      
  &lt;div class="container"&gt;
  
    &lt;div class="card"&gt;
        &lt;img src="assets/women1.jpeg" alt=""&gt;
        &lt;span class="discount"&gt;-20%&lt;/span&gt;
        &lt;div class="panel"&gt;
            &lt;a href="#" class="fa fa-heart"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-share"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-search"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;a href="#"&gt;&lt;button&gt;add to cart&lt;/button&gt;&lt;/a&gt;
        &lt;div class="info"&gt;
  
            &lt;h3&gt;women's clothing&lt;/h3&gt;
            &lt;div class="stars"&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star-half"&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;strong class="price"&gt;$100/-&lt;/strong&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="card"&gt;
        &lt;img src="assets/women1.jpeg" alt=""&gt;
        &lt;span class="discount"&gt;-20%&lt;/span&gt;
        &lt;div class="panel"&gt;
            &lt;a href="#" class="fa fa-heart"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-share"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-search"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;a href="#"&gt;&lt;button&gt;add to cart&lt;/button&gt;&lt;/a&gt;
        &lt;div class="info"&gt;
  
            &lt;h3&gt;women's clothing&lt;/h3&gt;
            &lt;div class="stars"&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star-half"&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;strong class="price"&gt;$100/-&lt;/strong&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="card"&gt;
        &lt;img src="assets/women1.jpeg" alt=""&gt;
        &lt;span class="discount"&gt;-20%&lt;/span&gt;
        &lt;div class="panel"&gt;
            &lt;a href="#" class="fa fa-heart"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-share"&gt;&lt;/a&gt;
            &lt;a href="#" class="fa fa-search"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;a href="#"&gt;&lt;button&gt;add to cart&lt;/button&gt;&lt;/a&gt;
        &lt;div class="info"&gt;
  
            &lt;h3&gt;women's clothing&lt;/h3&gt;
            &lt;div class="stars"&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                &lt;i class="fa fa-star-half"&gt;&lt;/i&gt;
            &lt;/div&gt;
            &lt;strong class="price"&gt;$100/-&lt;/strong&gt;
        &lt;/div&gt;
    &lt;/div&gt;
  
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>