title: Small unwanted space on top and bottom of page
body: <p>I have a to most probably simple problem.
  My page has a background color and contains a container, then a contentcontainer to put the page in the middle. Now this content container has a different background color, but a small space where we see the original page background color is visible at the top and bottom.</p>
  <p>The CSS file is like this:</p>
  <pre><code>body,td,th {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      background-color: #E0EBED;
  }
  #container {
      width: 100%;
  }
  
  #contentcontainer {
      background-color: #FFFFFF;
      width: 1000px;
      margin: 0 auto;
  }
  </code></pre>
  <p>The body looks like this:</p>
  <pre><code>&lt;div id=&quot;container&quot;&gt;
          &lt;div id=&quot;contentcontainer&quot;&gt;
          &lt;p&gt;Some content&lt;/p&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>What do I have to to to make this small space disappear.
  I have already tried to add 0 top padding to the container div and body.</p>
  <p>After a few answers I have discovered that margin: 0; the body css takes out the space at the top. I still have the same kind of space at the bottom though.</p>
  <p>To show people what I mean:
  <img src="https://i.stack.imgur.com/yyA0F.jpg" alt="bottom screenshot" /></p>
  <p><strong>NOW THIS IS THE FIX:</strong></p>
  <p>CSS:</p>
  <pre><code>body,td,th {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      background-color: #E0EBED;
      margin: 0;
  }
  #container {
      width: 100%;
  }
  
  #contentcontainer {
      background-color: #FFFFFF;
      width: 1000px;
      height: 100%;
      margin: 0 auto;
  }
  </code></pre>
  <p>I added <strong>margin: 0;</strong> to body and <strong>height: 100%;</strong> to content container. If you have the same problem do not forget to add the <strong>margin: 0;</strong> to the body as it will not work without that.</p>
  <p>Thanks to all that answered this question and helped me solve this!</p>