title: How to make every grid item the same width/height when one of them has an image child?
body: <p>I've been trying to get familiar with grid while making the sidebar, and I encountered the problem where my grid items/children aren't equal to each-other in height even though they're supposed to be the same size.</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>* {
    margin: 0;
    padding: 0;
  }
  
  .mainContainer {
    height: 500px;
    gap: 30px;
    display: grid;
    grid-row-template: repeat(auto-fill, 1fr);
    background-color: black;
    color: white;
    justify-items: center;
    align-items: start;
  }
  
  .mainContainer div {
    display: grid;
    align-content: center;
    justify-content: center;
    width: 60%;
    border: 1px solid yellow;
    height: 60%;
    border-radius: 10px;
  }
  
  .mainContainer img {
    height: 50%;
    width: 100%;
    object-fit: contain;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="mainContainer"&gt;
    &lt;div&gt; &lt;img src="https://pbs.twimg.com/profile_images/1455185376876826625/s1AjSxph_400x400.jpg"&gt; &lt;/div&gt;
    &lt;div&gt; Box 1 &lt;/div&gt;
    &lt;div&gt; Box 2 &lt;/div&gt;
    &lt;div&gt; Box 3 &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>