title: How do I create a DIV based on the browser size?
body: <hr>
  
  <blockquote>
    <p>Solved! Finished CSS and HTML at
    bottom.</p>
  </blockquote>
  
  <hr>
  
  <p>Ok, so here is the situation. I have a page with a div on the side, on top, and on bottom. The div on the side is on the left at 225px. The div on top is 25px, and the div on bottom is 20px. What I want is a div in the middle of them all, and so it resizes (and is scrollable) based on the visitors browser size.
  What I have works, but will not scroll, and is not the right width so I have to center all my content in it. Its just using the width of the browser, but pushed over a bit with a margin, so its actually hanging over underneath the sidebar.</p>
  
  <p><a href="http://img2.imageshack.us/img2/11/mockupl.jpg" rel="nofollow noreferrer">A quick sketch of how it's setup.</a></p>
  
  <p>Any ideas?</p>
  
  <p><strong>Key:</strong>
  menu is the top.
  bottom_menu is the bottom menu.
  content is the part I need help with, in the center.
  sidebar is what goes on the side.</p>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>@charset "UTF-8";
  /* CSS Document */
  
  html {
      height:100%;
  }
  
  img
  {
      border-style: none;
      color: #FFF;
      text-align: center;
  }
  
  body {
      height:100%;
      width:100%;
      margin:0px;
      padding:0px;
      background-color:#000;
  }
  
  .sidebar {
      background-image:url(../images/sidebar/background.png);
      background-repeat:repeat-y;
      width:225px;
      min-height:100%;
      position:fixed;
      top:25px;
      left:0px;
      overflow:hidden;
      padding-left:5px;
      padding-top:5px;
      font: 12px Helvetica, Arial, Sans-Serif;
      color: #666;
      z-index:1;
      }
  
  .menu {
      background-image:url(../images/top_menu/background.png);
      background-repeat:repeat-x;
      width:100%;
      height:25px;
      position:fixed;
      top:0px;
      left:0px;
      overflow:hidden;
      padding-left:5px;
  }
  
  .content {
      width:100%;
      top:25px;
      height:100%;
      overflow:hidden;
      position:fixed;
      padding-left:5px;
      padding-top:5px;
      background-color:#FFF;
      margin-left:112px;
      font: 14px Helvetica, Arial, Sans-Serif;
  }
  
  .bottom_menu {
      background-image:url(../images/bottom_menu/background.png);
      background-repeat:repeat-x;
      width:100%;
      height:20px;
      position:fixed;
      bottom:0px;
      left:0px;
      overflow:hidden;
      padding-left:5px;
      z-index:2;
      font: 12px Helvetica, Arial, Sans-Serif;
  }
  </code></pre>
  
  <p><strong>HTML (DIV Placement):</strong></p>
  
  <pre><code>&lt;body&gt;
  &lt;div class="sidebar"&gt;CONTENT IN SIDEBAR&lt;/div&gt;
  &lt;div class="menu"&gt;CONTENT IN TOP MENU&lt;/div&gt;
  &lt;div class="bottom_menu"&gt;CONTENT IN BOTTOM MENU&lt;/div&gt;
  &lt;div class="content"&gt;CONTENT IN CONTENT&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>Finished CSS</strong></p>
  
  <pre><code>@charset "UTF-8";
  /* CSS Document */
  
  img {
      border-style: none;
      color: #FFF;
      text-align: center;
  }
  body {
      background-color:#000;
      margin:0;
      padding:0;
      border:0;           /* This removes the border around the viewport in old versions of IE */
      width:100%;
      height:100%;
  }
  .sidebar {
      background-image:url(../images/sidebar/background.png);
      background-repeat:repeat-y;
      font: 12px Helvetica, Arial, Sans-Serif;
      color: #666;
      z-index:1;
      min-height:100%;
  }
  .menu {
      background-image:url(../images/top_menu/background.png);
      background-repeat:repeat-x;
      height:25px;
      clear:both;
      float:left;
      width:100%;
      position:fixed;
      top:0px;
      z-index:5;
      background-color:#000;
  }
  .bottom_menu {
      background-image:url(../images/bottom_menu/background.png);
      background-repeat:repeat-x;
      height:20px;
      z-index:2;
      font: 12px Helvetica, Arial, Sans-Serif;
      clear:both;
      float:left;
      width:100%;
      position:fixed;
      bottom:0px;
  }
  .colmask {
      position:relative;      /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
      clear:both;
      float:left;
      width:100%; /* width of whole page */
      overflow:hidden;    /* This chops off any overhanging divs */
      min-height:100%;
  }
  .sidebar .colright {
      float:left;
      width:200%;
      position:relative;
      left:225px;
      background:#fff;
  }
  .sidebar .col1wrap {
      float:right;
      width:50%;
      position:relative;
      right:225px;
  }
  .sidebar .col1 {
      margin:30px 15px 0 225px; /* TOP / UNKNOWN / UNKNOWN / RIGHT */
      position:relative;
      right:100%;
      overflow:hidden;
  }
  .sidebar .col2 {
      float:left;
      width:225px;
      position:fixed;
      top:0px;
      left:0px;
      margin-top:25px;
      margin-left:5px;
      right:225px;
  }
  .clear {
      clear: both;
      height: 1px;
      overflow: hidden;
  }
  </code></pre>
  
  <p><strong>Finished HTML:</strong></p>
  
  <pre><code>&lt;body&gt;
  &lt;div class="menu"&gt;HEADER CONTENT&lt;/div&gt;
  &lt;div class="colmask sidebar"&gt;
      &lt;div class="colright"&gt;
        &lt;div class="col1wrap"&gt;
              &lt;div class="col1"&gt;
                   CONTENT
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col2"&gt;
              LEFT SIDEBAR CONTENT
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="bottom_menu"&gt;FOOTER CONTENT&lt;/div&gt;
  &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>