title: Create Responsive Image Gallery
body: <p>I'm trying to create a responsive image gallery such as Instagram in mobile. I want to have 3 images in width, without margin from right and left. How can I achieve this?</p>
  
  <p>Here is what I have so far:</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>@media (max-width: 480px) {
      .portfolio-list li {
          width:33.3333%;
          height: 100px;
          border: 3px solid white;
          margin: -3px;
      }
  
      .portfolio-container,
      .portfolio-list {
          margin-right: 0 ;
          margin-left:0;
          margin-top:10px;
      }
  
      .portfolio-list {
          width: 100%;
      }
  }
  
  portfolio-list {
      list-style: none;
  }
  
  .portfolio-list li {
      position: relative;
      display: block;
      float: left;
  }
  
  .portfolio-list li img {
      display: block;
      width: 100%;
      margin:0;
      vertical-align: top;
      height: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;container class="portfolio-container text-center"&gt;
      &lt;ul class="portfolio-list" style="margin:0 auto"&gt;
          &lt;li style="margin:0 auto"&gt;
              &lt;a href="#"&gt;&lt;img src="{{$img['image']}}"&gt;&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/container&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>An image of the gallery that I have is:</p>
  
  <p><a href="https://i.stack.imgur.com/kSpix.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kSpix.jpg" alt="Image gallery"></a></p>