title: CSS - Overriding CSS Reset
body: <p>Problem: <code>margin: 0 auto</code> does not work on body. <code>background-color: #EEEEEE</code> on the other hand, is working even though they are on the same block.</p>
  
  <p>index.php:</p>
  
  <pre><code>&lt;html&gt;
  
      &lt;head&gt;
          &lt;title&gt;MForte&lt;/title&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/reset.css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/bodyStyleSheet.css"&gt;
      &lt;/head&gt;
  
      &lt;body id="container"&gt;
          &lt;p&gt;test&lt;/p&gt;
          &lt;p&gt;test&lt;/p&gt;
          &lt;p&gt;test&lt;/p&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>reset.css:</p>
  
  <pre><code>/**
  * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
  * http://cssreset.com
  */
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed,
  figure, figcaption, footer, header, hgroup,
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
      margin: 0;
      padding: 0;
      border: 0;
      font-size: 100%;
      font: inherit;
      vertical-align: baseline;
  }
  /* HTML5 display-role reset for older browsers */
  article, aside, details, figcaption, figure,
  footer, header, hgroup, menu, nav, section {
      display: block;
  }
  body {
      line-height: 1;
  }
  ol, ul {
      list-style: none;
  }
  blockquote, q {
      quotes: none;
  }
  blockquote:before, blockquote:after,
  q:before, q:after {
      content: '';
      content: none;
  }
  table {
      border-collapse: collapse;
      border-spacing: 0;
  }
  </code></pre>
  
  <p>bodyStyleSheet.css:</p>
  
  <pre><code>#container {
      margin: 0 auto;
      background-color: #EEEEEE;
  }
  </code></pre>
  
  <p>What I have tried:</p>
  
  <p>1) Swapping <code>&lt;link rel="stylesheet" type="text/css" href="css/reset.css"&gt;</code> and <code>&lt;link rel="stylesheet" type="text/css" href="css/bodyStyleSheet.css"&gt;</code> to each other.</p>
  
  <p>2) Removed the <code>id</code> of the <code>body</code> from the <code>index.php</code> file and replaced the <code>#container</code> by <code>body</code></p>
  
  <p>3) To test the scenario, since <code>border: 0</code> is declared on <code>reset.css</code>, I tried to create a <code>table</code> on <code>index.php</code> containing 2 rows. <code>border: 1</code> is declared on <code>reset.css</code> in the <code>table</code> tag. Border didn't show.</p>