title: How to center horizontally container cards with bootstrap 4?
body: <p>My objective is to center my container contains all cards.
  I using boostrap 4 and tried all things like <code>justify-content-center</code> but there is problem with the last line.
  Please see my snippet code in fullscreen.</p>
  
  <p>How to center horizontally container ? (like margin: 0 auto ?)</p>
  
  <p>Image: the problem there are too spacing on right.</p>
  
  <p><a href="https://i.stack.imgur.com/KmFna.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KmFna.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/KmFna.png" rel="nofollow noreferrer">Example</a> </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>.card-custom {
    max-width: 128px;
  }
  
  .container {
    max-width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;
  
  &lt;div class="container"&gt;
    &lt;div class="row mt-5"&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.netflix.com/fr/"&gt;
          &lt;img src="https://cdn1.iconfinder.com/data/icons/metro-ui-dock-icon-set--icons-by-dakirby/256/Netflix.png" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.hulu.com"&gt;
          &lt;img src="https://apprecs.com/ios-meta/app-icons/256/376510438.jpg" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.netflix.com/fr/"&gt;
          &lt;img src="https://cdn1.iconfinder.com/data/icons/metro-ui-dock-icon-set--icons-by-dakirby/256/Netflix.png" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.hulu.com"&gt;
          &lt;img src="https://apprecs.com/ios-meta/app-icons/256/376510438.jpg" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.netflix.com/fr/"&gt;
          &lt;img src="https://cdn1.iconfinder.com/data/icons/metro-ui-dock-icon-set--icons-by-dakirby/256/Netflix.png" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="card card-custom mx-2 mb-3"&gt;
        &lt;a href="https://www.hulu.com"&gt;
          &lt;img src="https://apprecs.com/ios-meta/app-icons/256/376510438.jpg" alt="" class="card-img"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>