title: Not able to fit img to div size : CSS Grid
body: <p>Hey I am trying to fit <code>img</code> to its <code>div</code> container. I am using CSS Grid for the layout.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html,
  body {
    margin: 0;
    padding: 0;
  }
  
  .container {
    display: grid;
    grid-template-columns: 1fr;
    grid-row: auto;
  }
  
  .item {
    height: 500px;
    border: 1px solid black;
  }
  
  .banner {
    max-width: 100%;
    max-height: 100%;
  }
  
  
  /* laptops and desktops */
  
  @media (min-width: 1025px) and (max-width: 1280px) {
    .container {
      grid-template-columns: repeat(2, 1fr);
      grid-row: 1fr;
      padding: 60px 130px 20px 130px;
      grid-gap: 50px;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="item"&gt;
      &lt;img class="banner" src="https://images.unsplash.com/photo-1479936343636-73cdc5aae0c3?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=6672a25aa653266572aaf2be253fb56a&amp;auto=format&amp;fit=crop&amp;w=1000&amp;q=80" /&gt;
    &lt;/div&gt;
    &lt;div class="item"&gt;
      &lt;img class="banner" src="https://images.unsplash.com/photo-1508296695146-257a814070b4?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=bfacf656c686ff7e39ac1386691557be&amp;auto=format&amp;fit=crop&amp;w=1000&amp;q=80" /&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>There's always a white space at the bottom of the <code>item</code> container. The image is covering the whole container. Can someone please tell me how I can fix this?</p>