title: Place a div to center of screen according to screen resolution in every browser
body: <p>How can i place the container to the center of the screen horizontally. The container has 8 images to be placed. All the images are to be aligned to a single line and should change accordingly to screen resolution.</p>
  
  <p>Here is my HTML</p>
  
  <pre><code>&lt;div id="container"&gt;
      &lt;div id="list"   &gt;
          &lt;img src="img/c1.png" style="display:box; width:125px; margin-left:5px; margin-top:9px" /&gt;
          &lt;img src="img/c2.png" style="display:box; width:125px;margin-left:5px;margin-top:9px"/&gt;
          &lt;img src="img/c3.png" style="display:box; width:125px;margin-left:5px;margin-top:9px" /&gt;    .
          .
          .
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#container{margin-left: auto;margin-right:auto;width:1200px;}
  </code></pre>