title: How to fix Wordpress admin bar destroying 100% height
body: <p>I'm creating a web site that fits to the screen with Wordpress.</p>
  
  <p>When the site owner logs in, the admin bar will appear but it adds the following style:</p>
  
  
  
  <pre><code>html{ margin-top: 28px !important; }
  </code></pre>
  
  <p>This causes a vertical scroll bar to appear. Is there any way to fix this using just CSS?</p>
  
  <p><a href="http://css-tricks.com/forums/topic/sticky-footer-being-destroyed-by-wordpress-admin-bar/" rel="noreferrer">Someone had a similar issue</a> but he got no answer.</p>
  
  <p>My relevant html structure:</p>
  
  <pre><code>&lt;html&gt;
     &lt;body&gt;
         &lt;div id="page"&gt;
         &lt;div class="site-main" id="main"&gt; 
                 &lt;div class="content-area" id="primary"&gt;
  
                     &lt;div role="main" class="site-content" id="content"&gt;
  
                     &lt;/div&gt;&lt;!-- #content .site-content --&gt;
  
                 &lt;/div&gt;&lt;!-- #primary .content-area --&gt;         
             &lt;/div&gt;&lt;!-- #main .site-main --&gt;
         &lt;/div&gt;&lt;!-- #page --&gt;
  
         &lt;div id="wpadminbar"&gt;
  
         &lt;/div&gt;
  
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And relevant CSS:</p>
  
  
  
  <pre><code>html, body, #page {
      width: 100%;
      height: 100%;
      min-width: 350px;
      margin: 0;
      padding: 0;
  }
  #main {
      height: 100%;
  }
  #primary {
      float: right;
      width: 100%;
      margin-left: -200px;
      height: 100%;
  }
  #content {
      margin-left: 250px;
      height: 100%;
  }
  </code></pre>
  
  <p>For the admin bar:</p>
  
  
  
  <pre><code>#wpadminbar {
    height: 28px;
    left: 0;
    min-width: 600px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99999;
  }
  </code></pre>
  
  <p>I've tried using (negative) margins and paddings, also setting the admin bar's <code>position</code> to <code>absolute</code> instead of <code>fixed</code> but no luck.</p>