title: scrollbar on inner div with height 100%
body: <p>I have a sidebar with header(with few tabs) and a content - form. I wish to have scrollbar on that form whenever the page is shrunk in a way that form content is not completely visible.</p>
  
  <p>My problem is that scrollbar appears too late and it is because of the header. I am boiling my head for hours, but I can't make it work. I have posted similar question yesterday, only without that header div, It worked I just can't make work this scenario.</p>
  
  <p>My approach so far is:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="sidebar"&gt;
    &lt;div id="tabheader"&gt;tab header...&lt;/div&gt;
    &lt;div id="formdiv"&gt;
      &lt;form id="my-form" enctype="multipart/form-data" method="post"&gt;
        &lt;label&gt;Dropdown 1
          &lt;select id="select1"&gt;&lt;/select&gt;
        &lt;/label&gt;
        &lt;label&gt;
          Dropdown 2
          &lt;select id="select2"&gt;&lt;/select&gt;
        &lt;/label&gt;
        &lt;label&gt;
          Dropdown 3
          &lt;select id="select3"&gt;&lt;/select&gt;
        &lt;/label&gt;
        &lt;label&gt;
          Dropdown 4
          &lt;select id="select4"&gt;&lt;/select&gt;
          &lt;button class="btn btn-success btn-default"&gt;Submit&lt;/button&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>div#sidebar {
    position: fixed;
    width: 400px;
    top: 0px;
    bottom: 0px;
    border: 3px solid red;
  }
  
  div#tabheader {
    display: table;
    border: 3px solid #8AC007;
  }
  
  div#formdiv {
    border: 3px solid blue;
    width: 350px;
    height: 100%;
    overflow-y: auto;
  }
  
  select {
    width: 300px;
  }
  </code></pre>
  
  <p><a href="https://jsfiddle.net/kefahuchi/wxyuLh5h/" rel="nofollow">And JSFiddle.</a></p>
  
  <p>When I remove that header div everything works well. </p>
  
  <p>Note: For my needs <strong>sidebar must have position fixed</strong>. I will prefer solution that not rely on knowing header height, if there is any such a solution.</p>