title: Is there any way for "position:absolute" div to retain relative width?
body: <p>Let's say I have two divs, one inside the other, like so:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;div id="outer" style="width:50%"&gt;
        &lt;div id="inner" style="width:100%"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Right now, the inner div has a width of 100% of 50% of the screen size, or 50% of the screen size. If I were to change the inner div to position absolute, like this:</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;div id="outer" style="width:50%"&gt;
        &lt;div id="inner" style="position:absolute;width:100%"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In this case the inner div takes up 100% of the screen space, because its position is set to absolute.</p>
  
  <p>My question is this: Is there any way to maintain relative width of the inner div while its position is set to absolute?</p>