title: Margin-right broken on width 100%
body: <p>I have a DIV containing an image and a second DIV. The parent DIV is set to <code>position: absolute;</code> the child DIV is set to <code>position: relative</code>. The idea is that I display my photo caption on top of my image.</p>
  
  <p>The child <code>DIV</code> should have <code>100%</code> width of the parent, minus <code>10px</code> on the left, right and bottom, plus a black background.</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>.article-container {
    position: relative;
  }
  
  .photo-caption {
    width: 100%;
    background-color: black;
    position: absolute;
    bottom: 0px;
    margin-right: 10px;
    margin-left: 10px;
    margin-bottom: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="span15 article-container"&gt;
    &lt;img src="images/example-image-1.png" /&gt;
    &lt;div class="photo-caption"&gt;This is the subtitle text on top.&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The left margin bumps <code>.photo-caption</code> outside the bounds of <code>.article-container</code>. The right margin doesn't seem to have any effect.</p>
  
  <p>I've also tried fixing this with <code>box-sizing</code>. It seems to get the width of <code>.photo-caption</code> down to the parent width but there's still the overhang.</p>