title: scrolling div height overflows footer and is hidden
body: <p>I'm trying to achieve a scroll-able div where its contents does not overflow behind the footer. There is a sidebar which has a search and another hidden div below it that shows filter options for the results displayed underneath. The results need to fill the remaining height available and scroll if there isn't enough space. At the moment it overflows so i can't see the bottom results as they are tucked behind the footer. I'm having a hard time getting the results div to only fill the remaining space.</p>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="header"&gt;
  header
  &lt;/div&gt;
    &lt;div id="map-wrapper"&gt;
      &lt;div id="map-sidebar"&gt;
        &lt;div id="map-search"&gt;
          &lt;input id="search" type="text" class="form-control" placeholder="Enter location" /&gt;
          &lt;div id="filters"&gt;
            &lt;input/&gt;
            &lt;input/&gt;
            &lt;input/&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div id="map-results"&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
            &lt;p&gt;content&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;    
      &lt;div id="map"&gt;&lt;/div&gt;  
    &lt;/div&gt;
    &lt;div id="footer"&gt;
    footer
    &lt;/div&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>div {
    border: 1px solid red;
  }
  
  #map-wrapper {
    position: fixed;
    top: 60px;
    bottom: 30px;
    left: 0;
    right: 0;
    width: 100%;
  }
  
  #map {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 250px;
    background: blue;
  }
  
  #map-sidebar {
     width: 250px;
     height: 100%;
  }
  
  #map-search {
      margin: 15px;
  }
  
  #map-results {
     height: 100%;
    overflow-y: scroll;
    border: 1px solid purple;
  }
  
  #header {
    height: 60px;
    top:0;
    left:0;
    right:0;
    position: fixed;
    text-align: center;
  }
  
  #filters {
    display: none;
  }
  
  #footer {
    height: 30px;
    bottom: 0;
    left:0;
    right:0;
    position: fixed;
    text-align: center;
  }
  </code></pre>
  
  <p>JsFiddle:
      <a href="https://jsfiddle.net/me6nceca/" rel="nofollow">https://jsfiddle.net/me6nceca/</a></p>
  
  <p>Thanks for any help</p>