title: CSS overflow-y for deeply nested divs
body: <p>I'm trying to understand how come my deepest two divs aren't scrolling in the y-direction. </p>
  
  <p>It's a 2 column layout nested within another 2 column layout, essentially looking like 3 columns. I've also made a <a href="https://codepen.io/samesmail/pen/qKdyNE?editors=1100" rel="nofollow noreferrer">Codepen</a> to demonstrate my exact architecture:</p>
  
  <p>My current solution applies an <code>overflow-y: scroll</code> to the two divs I want to scroll and all parent divs have been applied with <code>max-height: 100%; overflow: hidden</code>. </p>
  
  <p>Why doesn't this work? What is the best approach I should take?</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;
  }
  #app {
    padding-top: 60px;
    width: 100vw;
    height: 100vh;
    background: black;
    height: calc(100vh - 60px);
  }
  #navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 9999;
    background: cyan;
  }
  .route-container {
    display: grid;
    grid-template-columns: 0.2fr 0.8fr;
    grid-template-rows: auto;
    grid-template-areas:
      "sidemenu container";
    
    max-height: 100%;
    overflow: hidden;
    
    background: magenta;
  }
  .outer-side-menu {
    background: orange;
    grid-area: sidemenu;
  }
  .outer-container {
    grid-area: container;
    background: yellow;
    
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 50px auto;
    grid-template-areas: 
      "tab-menu"
      "tab-container";
    
    overflow: hidden;
    max-height: 100%;
  }
  .tab-menu {
    grid-area: tab-menu;
    background: red;
  }
  .tab-container {
    grid-area: tab-container;
    background: purple;
    
    max-height: 100%;
    overflow: hidden;
  }
  .content-container {
    display: grid;
    grid-template-columns: 0.35fr 0.65fr;
    grid-template-rows: auto;
    grid-template-areas: "inner-menu inner-content";
    
    max-height: 100%;
    overflow: hidden;
    
    font-size: 144px;
    background: teal;
  }
  .inner-menu {
    grid-area: inner-menu;
    overflow-y: scroll;
    background: pink;
  
  }
  .inner-content {
    grid-area: inner-content;
    overflow-y: scroll;
    background: teal;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="app"&gt;
    &lt;div id="navbar"&gt;Navigation&lt;/div&gt;
    &lt;div class="route-container"&gt;
      &lt;div class="outer-side-menu"&gt;Side Menu&lt;/div&gt;
      &lt;div class="outer-container"&gt;
        &lt;div class="tab-menu"&gt;
          Tabs
        &lt;/div&gt;
        &lt;div class="tab-container"&gt;
          &lt;div class="content-container"&gt;
            &lt;div class="inner-menu"&gt;
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
              Inner Menu
            &lt;/div&gt;
            &lt;div class="inner-content"&gt;
              Inner Content 
              Inner Content 
              Inner Content 
              Inner Content
              Inner Content
              Inner Content
              Inner Content
              Inner Content
              Inner Content
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>