title: Higher z-index of a child when parent is equal z-index with another div hides the absolute child
body: <p><em>I have a constraint: these 2 parent divs cannot be "one is higher than the other", they are both equal in importance.</em></p>
  
  <p>I have 2 main divs, they're both <code>z-index: 2</code>. Inside the first div, I have a <code>child</code> whose <code>z-index is 99999</code>, now, because both <code>relative</code> and <code>static</code> are treated by the browser in a first-come-last-important fashion, that is to say, div2 has a higher order than div1, my absolute <code>child</code> inside <code>div1</code> will be behind <code>div2</code>. Watch:</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>#item1 {
    width: 100%;
    height: 200px;
    background-color: gray;
    position: relative;
    z-index: 2;
  }
  
  #child {
    position: absolute;
    bottom: -15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    z-index: 15;
  }
  
  #item2 {
    width: 100%;
    height: 200px;
    background-color: green;
    position: relative;
    z-index: 2;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="item1"&gt;
    &lt;div id="child"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="item2"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>What am I missing here? The web is supposedly full of divs that are <code>relative</code> and come one after another and they have absolute divs inside of them.</p>