title: How can I make a fixed positioned div inherit width of parent?
body: <p>Is there a way a fixed positioned div can inherit the width of a parent?</p>
  
  <p>I know fixed width is relative to the window's so this code doesn't work:  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#wrapper{
          position: relative;
          width:500px;
          height: 20px;
          background-color: blue;
  }
  
  #header{
          position: fixed;
          width: 100%;
          height: 20px;
          background-color: rgba(255,0,0,0.5);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="wrapper"&gt;
    #wrapper
          &lt;div id="header"&gt;
            #header
          &lt;/div&gt;
      &lt;/div&gt;
  
      </code></pre>
  </div>
  </div>
  </p>