title: How to place a div at top center position of a page using CSS?
body: <p>I am not able to place a div at the top center of a page. I am using CSS for this but nothing works here.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#loader {
    position: relative;
    margin: 0 auto;
    text-align: left;
    clear: left;
    height: auto;
    z-index: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;div id="loader" style='display: none'&gt;&lt;img src='img/basic/loader4.gif' /&gt;&lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I had already given 2 hours on this but still not able to figure it out.</p>