title: How to have absolute div fit parent width/padding?
body: <p>I need to have positioning set to absolute so I can have <code>#bottom</code> fixed at the bottom of the screen. I also need to have this fit the width/padding of the container <code>#panel</code>. When I set the position to absolute however, the width just fills the whole screen's width, how can I stop this? I need #bottom to fit inside the width/padding of <code>#panel</code>.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="panel"&gt;
      &lt;div id="bottom"&gt;
          &lt;div class="update"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#panel {
      width: 21.25%;
      height: 100%;
      background-color: #0794ea;
      float: left;
      padding: 0 1.5%;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
  }
  
  .update {
      width: 100%;
      background-color: #006699;
      text-align: center;
      height: 56px;
      color: white;
  }
  
  #bottom {
      position: absolute;
      bottom: 20px;
      width: 100%;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xG08l.png" alt="enter image description here"></p>
  
  <p>Above is an image of what's happening. Green is the padding and blue is the content area it should be fitting in (dark blue is the actual div (<code>#panel</code>) that I'm trying to fit in the content area). I'm assuming because it's absolute it's ignoring this, I'm looking for a way to get around this.</p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/qTJhW/" rel="noreferrer">http://jsfiddle.net/qTJhW/</a></p>
  
  <p>Thanks</p>