title: Z-index in front of an element in a fixed position
body: <p>I do not find a solution to my problem so I turn to you :).</p>
  
  <p>Here is the context: I have two brothers elements, one is absolute position and the other is in a fixed position. Basic the fixed element is always at the top. Consider in the code below:</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>* {
    box-sizing: border-box;
  }
  html, body{
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
  }
  #element1 {
    background: red;
    height: 100%;
    width: 100%;
    position: absolute;
  }
  #element2 {
    background: green;
    margin: 0 auto;
    height: 200px;
    position: absolute;
    width: 600px;
  }
  #element3 {
    background: blue;
    height: 200px;
    position: fixed;
    bottom: 0;
    width: 100%;
  }
  
  #element1,
  #element3 {
    z-index: 1;
  } 
  #element2 {
    z-index: 10;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="element1"&gt;
    &lt;div&gt;
       &lt;div id="element2"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div id="element3"&gt;
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="http://jsfiddle.net/P7c9q/1162/" rel="nofollow noreferrer">http://jsfiddle.net/P7c9q/1162/</a></p>
  
  <p>That the green color area is a modal. My objective is to make the element green over the element in a fixed position.</p>
  
  <p>How can I unlock myself knowing that element 1 and element 2 must remain in absolute position?</p>
  
  <p>Thank you in advance,
  cordially.</p>