title: Container shifts when adding margin to child
body: <p>I've got two div elements with my classes container and innercontainer with the following CSS styles. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
    width: 200px;
    height: 200px;
    background-color: green;
  }
  .innercontainer {
    height: 30px;
    background-color: red;
    margin: auto;
    margin-top: 80px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="innercontainer"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>What I expected was a red rectangle almost in the center of a green square.</p>
  
  <p>What I got was a red rectangle on top of a green square. It shifted my rectangle 80px down but why does it put my square below the rectangle?</p>
  
  <p>If I put a border around the square everything goes as expected. The same is if I say <code>position: fixed</code> in my container class.</p>
  
  <p>I thought block elements orient themselves at the border of their surrounding container. In this case it seems to me as if innerconainer orients itself at the body?</p>