title: Add scroll to each column in CSS Grid Layout
body: <p>I want separate scroll on each of my columns in my grid layout.</p>
  
  <p>Currently, I am developing a mobile only web application. I want to use a different grid layout for the portrait and landscape orientations. </p>
  
  <p>The portrait orientation is just 1 column and every element is after the other. No problem here.</p>
  
  <p>In the landscape orientation I want to use 2 columns. My whole content is displayed on the left side and my navigation moves to the right side. Now I want both parts to have a separate scroll. Is there a way to implement this? And the scroll should stop if the content of the current column ends.</p>
  
  <p>Code on CodePen: <a href="https://codepen.io/SuddenlyRust/pen/rmJOqV" rel="noreferrer">https://codepen.io/SuddenlyRust/pen/rmJOqV</a></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>.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    grid-gap: 15px 0;
  }
  
  header {
    background-color: green;
    grid-column: 1;
    grid-row: 1
  }
  
  main {
    background-color: blue;
    grid-column: 1;
    grid-row: 2;
  }
  
  nav {
    background-color: pink;
    grid-column: 1;
    grid-row: 3;
  }
  
  footer {
    background-color: teal;
    grid-column: 1;
    grid-row: 4;
  }
  
  @media only screen and (orientation: landscape) {
    .grid-container {
      grid-template-columns: 5fr 4fr;
    }
    nav {
      grid-column: 2;
      grid-row: 1 / span 3;
    }
    footer {
      grid-row: 3;
    }
  }
  
  h1 {
    min-height: 200px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="grid-container"&gt;
    &lt;header&gt;
      &lt;h1&gt;Logo&lt;/h1&gt;
    &lt;/header&gt;
    &lt;main&gt;
      &lt;h1&gt;content&lt;/h1&gt;
    &lt;/main&gt;
    &lt;nav&gt;
      &lt;h1&gt;Navigation&lt;/h1&gt;
    &lt;/nav&gt;
    &lt;footer&gt;
      &lt;h1&gt;Footer&lt;/h1&gt;
    &lt;/footer&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank you very much for your time!</p>