title: CSS Grids Empty Space Left Before An Element That Would Fit In It
body: <p>Hi guys I could not find any helping examples since I have never used CSS grids, anyways how would I fill the empty space in the grid with next element? My <code>1fr</code> element does not fit in the previous space that is available. Is it due to that I'm doubling the height of the class or what?
  Like I've said I have never used CSS grids but I only need them now and this is the last thing I would add to the code, could you guys help me out?</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>#container {
    width: 40%;
    margin-left: 20%;
    margin-bottom: 1rem;
    display: grid;
    float: left;
    grid-template-columns: auto;
  }
  
  #container&gt;div:nth-child(1) {
    margin-top: 0 !important;
  }
  
  .content-1x,
  .content-2x,
  .content-3x {
    margin: 1rem 1rem 0 0;
    height: 15rem;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
  }
  
  .double-height {
    height: 30rem;
  }
  
  .content-3x {
    grid-area: auto / auto / auto / span 3;
  }
  
  .content-2x {
    grid-area: auto / auto / auto / span 2;
  }
  
  .content-1x {
    grid-area: auto / auto / auto / span 1;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;div class="content-3x"&gt;
      3
    &lt;/div&gt;
    &lt;div class="content-2x double-height"&gt;
      4
    &lt;/div&gt;
    &lt;div class="content-1x"&gt;
      5
    &lt;/div&gt;
    &lt;div class="content-1x"&gt;
      5
    &lt;/div&gt;
    &lt;div class="content-2x"&gt;
      4
    &lt;/div&gt;
    &lt;div class="content-1x"&gt;
      5
    &lt;/div&gt;
    &lt;div class="content-2x"&gt;
      4
    &lt;/div&gt;
    &lt;div class="content-3x"&gt;
      6
    &lt;/div&gt;
    &lt;div class="content-2x"&gt;
      7
    &lt;/div&gt;
    &lt;div class="content-1x"&gt;
      8
    &lt;/div&gt;
    &lt;div class="content-1x"&gt;
      9
    &lt;/div&gt;
    &lt;div class="content-2x"&gt;
      10
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there any easy way to do this without using media queries or sth like that?</p>