title: Z-index issue in child and sibling elements
body: <p>I'm having three <code>div</code> in my page.</p>
  
  <ul>
  <li>One parent (<code>z-index: 5</code>)</li>
  <li>One sibling (of the parent) (<code>z-index: 10</code>)</li>
  <li>One child (of the parent) (<code>z-index: 11</code>)</li>
  </ul>
  
  <p>All the <code>div</code> are using <code>position: fixed</code> property.</p>
  
  <p>My problem is the stacking order of the three elements.</p>
  
  <p>I'm using the 'sibling'  <code>div</code> as a freeze layer in the app.</p>
  
  <p>I want the sibling <code>div</code> to be positioned between the parent and its child <code>div</code></p>
  
  <p>AFAIK, by using the <code>position: fixed</code> property, we can position the divs anywhere in a page and use any stacking order.</p>
  
  <p>But it's not working for my current scenario.</p>
  
  <p>Please find the attached code:</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>.fixed {
    position: fixed;
  }
  
  .outer {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: yellow;
    z-index: 5;
  }
  
  .child {
    width: 200px;
    height: 30px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: red;
    z-index: 11;
    color: #fff;
  }
  
  .sibling {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="fixed outer"&gt;
    &lt;div class="fixed child"&gt;
      I want this div to be on top
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="fixed sibling"&gt;
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>