title: Center and layer multiple DIVs with flexbox
body: <p>I would like to layer multiple DIVs on top of one another while using flexbox to vertically and horizontally center them both.</p>
  
  <p>In the example below, I would like both <code>.whitebox</code> and <code>.bluebox</code> to be vertically and horizontally centered inside of the container, overlapping one another. Currently <code>.whitebox</code> is positioned with absolute position. Is this possible?</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 {
    height: 16px;
    width: 16px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
  }
  
  .bluebox {
    height: 16px;
    width: 16px;
    background-color: #0073FF;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
  }
  
  .whitebox {
    height: 8px;
    width: 8px;
    background-color: white;
    border-radius: 4px;
    position: absolute;
    top: 0;
    left: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="bluebox"&gt;&lt;/div&gt;
    &lt;div class="whitebox"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>