title: How to create horizontal bar that sits 75% across the screen, but stretches as screen is resized?
body: <p>I want to create 3 horizontal bars that will sit at the top of a page. </p>
  
  <p>What I'm trying to achieve is to get the bars to sit from the edge of the screen to about 75% of the width of the page. </p>
  
  <p>The top bar is aligned right, the middle bar aligned left and the bottom bar aligned right again. </p>
  
  <p>I would like to get the bars so that they overlap each other in the middle (by about 25% - hence the 75% width) of the page, but if the window is then resized the bars need to stay static in the middle of the page, but stretch so they resize to keep aligned to the very edge of the page.</p>
  
  <p>I have an example of the initial setup here: <a href="http://jsfiddle.net/headshot_harry/LsNby/2/" rel="nofollow">http://jsfiddle.net/headshot_harry/LsNby/2/</a></p>
  
  <p>But as you can see, the bars stay aligned to the edge of the page when the window is resized, but they are not static in the middle. I need them to resize or "stretch" whilst keeping the overlap in the middle of the screen intact. </p>
  
  <p>Code below:</p>
  
  <h1>HTML</h1>
  
  <pre><code>&lt;div id="headerBar1"&gt;&lt;/div&gt;
  &lt;div id="gap"&gt;&lt;/div&gt;
  &lt;div id="headerBar2"&gt;&lt;/div&gt;
  &lt;div id="gap"&gt;&lt;/div&gt;
  &lt;div id="headerBar3"&gt;&lt;/div&gt;
  &lt;div id="content"&gt;&lt;/div&gt;​
  </code></pre>
  
  <h1>CSS</h1>
  
  <pre><code>#gap {
      width: 100px;
      height: 3px;
      border: 0px solid black;
  }
  
  #content {
      width: 600px;
      margin: 10px auto;
      background: #ccc;
      border: 1px solid black;
      height: 100px
  }
  
  #headerBar1 {
      height: 40px;
      background: blue;
      width: 400px;
      margin-left: auto;
  }
  #headerBar2 {
      height: 40px;
      background: blue;
      width: 400px;
  }
  
  #headerBar3 {
      height: 40px;
      background: blue;
      width: 400px;
      margin-left: auto;
  }
  </code></pre>
  
  <p>​</p>