title: margin of an element
body: <p>I have this simple html and css</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>body{
    background-color: black;
    padding:0;
    margin: 0;
    box-sizing: border-box;
  }
  
  #ctr{
    height: 500px;
    width: 200px;
    margin: 0 auto;
    background-color: red;
  
  }
  
  #ctr &gt; .box{
    background-color: white;
    height: 200px;
    width: 200px;
    border: 1px solid black;
    margin-top:10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id = "ctr"&gt;
    &lt;div class = "box"&gt;
      &lt;div class="something1"&gt;&lt;/div&gt;
      &lt;div class="something2"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm trying to add margin-top to the white box (box class) inside the red div(ctr id), but the whole red div is getting the margin and not just the white div.</p>
  
  <p>here's a jsfiddle of the example.
  <a href="https://jsfiddle.net/6tvrwxhg/" rel="nofollow">https://jsfiddle.net/6tvrwxhg/</a></p>