title: Make a div use a scrollbar instead of growing bigger
body: <p>I have a navbar with a container in it. This container will hold many divs later on. It should act like a tree view. I want the navbar to fill the whole left side from top to bottom. But when the content grows bigger, it should stop growing, a scrollbar should appear.</p>
  
  <p>Using <code>height: 100%</code> does not work because currently my navbar is empty so the bar is a small one.</p>
  
  <p>Here I attached two pictures, showing what I need. I want the bar "navContent" filling untill it reaches the bottom bar. </p>
  
  <p><a href="https://i.stack.imgur.com/3B1Vf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3B1Vf.png" alt="CurrentState"></a></p>
  
  <p><a href="https://i.stack.imgur.com/QSo7N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QSo7N.png" alt="enter image description here"></a></p>
  
  <p>Here you can see a working fiddle with a full overview, I want the yellow bar to grow till it reaches the bottom.</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;
  }
  
  .bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
  }
  
  #navBar {
    height: 100%;
  }
  
  #btnBar {
    height: 40px;
  }
  
  #navContent {
  background-color: yellow;
  }
  
  #wrapper {
    margin: 0;
  }
  
  #navBar {
    float: left;
    width: 30%;
    overflow: hidden;
  }
  
  #mainContainer {
    float: left;
    width: 70%;
    overflow: hidden;
  }
  
  #header {
    height: 50px;
    background-color: red;
  }
  
  #headerContent {
    height: 100%;
    width: 80%;
  }
  
  #headerTitle {
    margin: auto;
  }
  
  .headerBtn {
    margin: 0px 10px 0px 10px;
  }
  
  #footer {
    position: fixed;
    bottom: 0;
    height: 50px;
    width: 100%;
    background-color: red;
  }
  
  #footerContent {
    height: 100%;
  }
  
  .footerBtn {
    margin: 0px 20px 0px 20px;
  }
  
  #mainContainer {
    height: 100%;
    background-color: inherit;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="header"&gt;
      &lt;div id="headerContent" class="bar"&gt;
        &lt;p id="headerTitle"&gt;Title&lt;/p&gt;
        &lt;button class="btn headerBtn"&gt;Profile&lt;/button&gt;
        &lt;button class="btn headerBtn"&gt;Logout&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div id="wrapper"&gt;
  
      &lt;div id="navBar"&gt;
        &lt;div id="btnBar" class="bar"&gt;
          &lt;button class="btn navBtn"&gt;New Folder&lt;/button&gt;
          &lt;button class="btn navBtn"&gt;New File&lt;/button&gt;
          &lt;button class="btn navBtn"&gt;Delete&lt;/button&gt;
        &lt;/div&gt;
        &lt;div id="navContent"&gt;
  
          navContent
  
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div id="mainContainer"&gt;
        Content
      &lt;/div&gt;
  
    &lt;/div&gt;
  
    &lt;div id="footer"&gt;
      &lt;div id="footerContent" class="bar"&gt;
        &lt;button class="btn footerBtn"&gt;Help&lt;/button&gt;
        &lt;button class="btn footerBtn"&gt;Conditions&lt;/button&gt;
        &lt;button class="btn footerBtn"&gt;Terms&lt;/button&gt;
        &lt;button class="btn footerBtn"&gt;Imprint&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>