title: How can I make my grid layout stack for mobile?
body: <p>Netlify of the current state of the school project i am working on with: <a href="https://quizzical-turing-2f83cf.netlify.app/index.html" rel="nofollow noreferrer">school project site</a></p>
  <p>If you open the project site, you will see 5 boxed next to each other where it all have &quot;limited&quot; written in them.</p>
  <p>I have made the parent (div.section2) as grid. but clearly there is something missing that does not make it responsive. I wonder how to set it up to be responsive, that the boxes appear under each other on smaller screen-size but also have gap in between when it appear under each other.</p>
  <p>Here is the code for that section:</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>.section2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, 20%);
  }
  
  .men__limited,
  .women__limited,
  .junior__limited,
  .gears__limited,
  .explore__limited {
    font-family: var(--nav-font);
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    margin: 0;
    
  }
  
  .men__limited &gt; a &gt; img,
  .women__limited &gt; a &gt; img,
  .junior__limited &gt; a &gt; img,
  .gears__limited &gt; a &gt; img,
  .explore__limited &gt; a &gt; img {
    object-fit: cover;
    width: 100%;
    max-height: 100%;
    height: 100%;
  }
  
  .men__limited &gt; a &gt; .men__limited--title &gt; h1,
  .women__limited &gt; a &gt; .men__limited--title &gt; h1,
  .junior__limited &gt; a &gt; .men__limited--title&gt; h1,
  .gears__limited &gt; a &gt; .men__limited--title &gt; h1,
  .explore__limited &gt; a &gt; .men__limited--title &gt; h1 {
    position: absolute;
    top: 20%; /* these lines centers text*/
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--black-color);
    font-size: 2rem;
  }
  
  .men__limited &gt; a &gt; .men__limited--title,
  .women__limited &gt; a &gt; .men__limited--title,
  .junior__limited &gt; a &gt; .men__limited--title,
  .gears__limited &gt; a &gt; .men__limited--title,
  .explore__limited &gt; a &gt; .men__limited--title,
  .vip &gt; .men__limited--title {
    position: absolute;
    top: 0;
    left: 0;
  
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 100;
    transition: all 0.4s;
    z-index: 4;
  }
  
  .men__limited &gt; a &gt; .men__limited--title:hover,
  .women__limited &gt; a &gt; .men__limited--title:hover,
  .junior__limited &gt; a &gt; .men__limited--title:hover,
  .gears__limited &gt; a &gt; .men__limited--title:hover,
  .explore__limited &gt; a &gt; .men__limited--title:hover {
    background-color: rgba(173, 173, 173, 0.4);
    opacity: 100;
    transition: all 0.4s;
    z-index: 4;
  }
  
  .men__limited &gt; a &gt; .limited__btn,
  .women__limited &gt; a &gt; .limited__btn,
  .junior__limited &gt; a &gt; .limited__btn,
  .gears__limited &gt; a &gt; .limited__btn,
  .explore__limited &gt; a &gt; .limited__btn,
  .vip &gt; a &gt; .limited__btn {
    background: transparent;
    background-color: rgb(255, 255, 255, 0.5);
    border: 1px solid rgb(112, 112, 112, 0.8);
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--black-color);
    display: absolute;
    height: 4rem;
    font-size: 1.4em;
    font-weight: 600;
  
    position: relative;
    text-decoration: none;
    width: 14rem;
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    text-transform: uppercase;
    cursor: pointer;
  }
  
  
  .men__limited &gt; a &gt; .limited__btn:hover,
  .women__limited &gt; a &gt; .limited__btn:hover,
  .junior__limited &gt; a &gt; .limited__btn:hover,
  .gears__limited &gt; a &gt; .limited__btn:hover,
  .explore__limited &gt; a &gt; .limited__btn:hover,
  .vip &gt; a &gt; .limited__btn:hover  {
    background-color: var(--white-color);
   
  }
  
  
  .men__limited--title &gt; h1 {
    position: absolute;
    top: 40%; /* these lines centers text*/
    left: 50%;
    transform: translate(-50%, -50%);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section class="section2"&gt;
          &lt;div class="men__limited"&gt;
            &lt;a href="#"
              &gt;&lt;img src="img/men-limited.jpg" alt="" /&gt;
              &lt;div class="men__limited--title"&gt;
                &lt;h3&gt;
                  LIMITED MEN &lt;br /&gt;
                  OFFERS
                &lt;/h3&gt;
              &lt;/div&gt;
  
              &lt;button class="limited__btn"&gt;Explore Now&lt;/button&gt;&lt;/a
            &gt;
          &lt;/div&gt;
          &lt;div class="women__limited"&gt;
            &lt;a href="#"
              &gt;&lt;img src="img/women-limited.jpg" alt="" /&gt;
              &lt;div class="men__limited--title"&gt;&lt;h3&gt;LIMITED WOMEN OFFERS&lt;/h3&gt;&lt;/div&gt;
              &lt;button class="limited__btn"&gt;Explore Now&lt;/button&gt;&lt;/a
            &gt;
          &lt;/div&gt;
          &lt;div class="junior__limited"&gt;
            &lt;a href="#"
              &gt;&lt;img src="img/junior-limited.jpg" alt="" /&gt;
              &lt;div class="men__limited--title"&gt;&lt;h3&gt;LIMITED JUNIOR OFFERS&lt;/h3&gt;&lt;/div&gt;
              &lt;button class="limited__btn"&gt;Explore Now&lt;/button&gt;&lt;/a
            &gt;
          &lt;/div&gt;
          &lt;div class="gears__limited"&gt;
            &lt;a href="#"
              &gt;&lt;img src="img/gears-limited.jpg" alt="" /&gt;
              &lt;div class="men__limited--title"&gt;&lt;h3&gt;LIMITED GEARS OFFERS&lt;/h3&gt;&lt;/div&gt;
              &lt;button class="limited__btn"&gt;Explore Now&lt;/button&gt;&lt;/a
            &gt;
          &lt;/div&gt;
          &lt;div class="explore__limited"&gt;
            &lt;a href="#"
              &gt;&lt;img src="img/explore-limited.jpg" alt="" /&gt;
              &lt;div class="men__limited--title"&gt;&lt;h3&gt;LIMITED ADVENTURE OFFERS&lt;/h3&gt;&lt;/div&gt;
              &lt;button class="limited__btn"&gt;Explore Now&lt;/button&gt;&lt;/a
            &gt;
          &lt;/div&gt;
        &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>