title: Why does IE8 ignore a child element's margin?
body: <p>When I add a <code>margin</code> to <code>.child</code> in the following code IE8 ignores it. In modern browsers the same code is working as expected. What is causing this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html lang=“de“ xml:lang=“de“ xmlns="http://www.w3.org/1999/xhtml"&gt;
  
  &lt;head&gt;
    &lt;meta http-equiv=“Content-Type“ content=“text/html“; charset=“iso-8859-1“ /&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;style&gt;
      .parent {
        margin: 5px;
        border: 10px solid blue;
        position: relative;
      }
      .child {
        margin: 10px;
        border: 10px solid red;
        padding: 4px;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
    &lt;div class="parent"&gt;
      &lt;p class="child" style="width:80%; position:relative; left:10px; top:10px; background-color:yellow;"&gt;I'm the CHILD!
        &lt;span id="textOutput"&gt;&lt;/span&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>