title: CSS div layout positioning
body: <p>I want to draw 4 divs according to the following picture.</p>
  
  <p><a href="https://i.stack.imgur.com/COPmc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/COPmc.png" alt="enter image description here"></a></p>
  
  <p>But instead I'm getting this.</p>
  
  <p><a href="https://i.stack.imgur.com/r5LdO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r5LdO.png" alt="enter image description here"></a></p>
  
  <p>Below is my html. The wrapping div's position is set to relative and the containing div's to absolute. But, they are all stacked up on one another. Thank you.</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> #container{
      position: relative;
     }
     .blocks{
      width: 200px;
      height: 100px;
      border: 1px solid black;
      text-align: center;
     }
     #1{
      position: absolute;
      margin: auto auto;
     }
     #2{
      position: absolute;
      float: left;
     }
     #3{
      position: absolute;
      float: right;
     }
     #4{
      position: absolute;
      margin: auto auto;
      bottom: 20px;
     }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
        &lt;title&gt;&lt;/title&gt;
        &lt;meta charset="utf-8"&gt;
      &lt;/head&gt;
   &lt;body&gt;
        &lt;div id="container"&gt;
    &lt;div class="blocks" id="1"&gt;1&lt;/div&gt;
    &lt;div class="blocks" id="2"&gt;2&lt;/div&gt;
    &lt;div class="blocks" id="3"&gt;3&lt;/div&gt;
    &lt;div class="blocks" id="4"&gt;4&lt;/div&gt;
        &lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>