title: Absolute positioned div inside of block with position:fixed and scrollbars
body: <p>I have a div with <code>position: fixed</code>, which contains two other divs inside: one with content and second which must always be positioned on the bottom of the main div. </p>
  
  <p>Here is an example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.scroller {
    position: fixed;
    border: 1px solid #ddd;
    width: 240px;
    height: 100px;
    top: 0;
    bottom: 0;
    overflow: auto;
  }
  .footer {
    position: absolute;
    bottom: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="scroller"&gt;
    &lt;div class="content"&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="footer"&gt;FOOTER&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that footer starts to move with other content when user scrolls content of the main block, despite of position:absolute of the footer block.</p>
  
  <p>Is there any way to stick footer to the bottom of the main fixed block without changing html structure?</p>
  
  <p>And what if main div contains many children and only last of them is the footer which we need to stick to bottom? Example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="true">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.scroller {
    position: fixed;
    border: 1px solid #ddd;
    width: 240px;
    height: 100px;
    top: 0;
    bottom: 0;
    overflow: auto;
  }
  .footer {
    position: absolute;
    bottom: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="scroller"&gt;
    &lt;div class="content"&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="content"&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="content"&gt;
      &lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;&lt;div&gt;content&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="footer"&gt;FOOTER&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>