title: How do you get a position:absolute; element above a position:relative; one
body: <p>You can see the issue in <a href="https://jsfiddle.net/sonicblis/d03sgffr/2/" rel="noreferrer">this fiddle</a>.</p>
  
  <p>I've got an absolutely positioned element with a z-index of 2 and a relatively positioned element with a z-index of 1.  The relatively positioned element contains the absolutely positioned one.  I thought that the z-index:2 element would show above the z-index:1 items, but it does not.  Is there a way to fix this so that the z-index:2 items are above all z-index:1 items?</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>div {
    background: green;
    position: relative;
    width: 100%;
    z-index: 1;
  }
  
  span {
    top: 0;
    right: 0;
    z-index: 2;
    position: absolute;
    border: solid 1px red;
    height: 70px;
    background: white;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
    Row 1
    &lt;span&gt;I thought this would show above 'Row 2'&lt;/span&gt;
  &lt;/div&gt;
  &lt;div&gt;
    Row 2
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>