title: Relative positioning at width 100% doesn't make the content go edge to edge
body: <p>I've been facing this problem many times and I decided to ask. When I use relative positioning with <code>width:100%</code>, the content doesn't go edge to edge of the screen. On the other hand, when I use absolute or fixed positioning, the content does go edge to edge. Why is this? Here's a sample code to show my problem:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#container {
    display: block;
    width: 100%;
    position: relative;
    height: 150px;
    border: 1px solid;
    text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id='container'&gt;
    &lt;br /&gt;
    &lt;br /&gt;^
    &lt;br /&gt;
    &lt;- Why do I have these spaces? -&gt;
      &lt;br /&gt;\/
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Result:
  <img src="https://i.stack.imgur.com/LyRMY.png" alt="enter image description here"></p>
  
  <p>What I want:
  <img src="https://i.stack.imgur.com/nzQeO.png" alt="enter image description here"></p>
  
  <p>While Googling, I did come across <a href="https://stackoverflow.com/questions/18520625/css-trying-to-use-width100-to-make-a-table-expand-relative-to-window-size-cre">this page</a>, but it looks like this problem was caused by not applying <code>text-align: center</code>.</p>