title: CSS: Create one box inside another
body: <p>I am CSS beginner, want to create simple box and put another box exacly center of first box,</p>
  
  <p>tried something like this </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>#first {
      width: 100px;
      height: 100px;
      background: red;
  }
  #first #second{
      width: 50%;
      height: 50%;
      background: green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>     
       &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
       &lt;meta charset="utf-8"&gt;
       &lt;title&gt;BOX-EXAMPLE&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;div id="first"&gt;
        &lt;div id="second"&gt;&lt;/div&gt;
       &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but not as expected.</p>