title: width of child div is larger than parent
body: <p>I need my child div to stick to the bottom of the parent div, hence the <code>position: absolute</code> and <code>bottom: 0px</code>. I also need the child width to be the same as the parent, and I thought <code>box-sizing: border-box</code> would work, but the width of the child still protrudes to the right, due to the padding and margins. </p>
  
  <p>How do I fix this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.parent {
    height: 500px;
    min-width: 500px;
    position: relative;
    background-color: red;
  }
  
  .child {
    padding: 10px 10px 10px 10px;
    margin: 10px 10px;
    background-color: grey;
    bottom: 0px;
    box-sizing: border-box;
    position: absolute;
    width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="parent"&gt;
    &lt;div class="child"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/sbmq6z5a/3/" rel="noreferrer">View on JSFiddle</a></p>