title: Cross browser div center alignment using CSS
body: <p>What is the easiest way to align a <code>div</code> whose position is <code>relative</code> horizontally and vertically using CSS ? The width and the height of the <code>div</code> is unknown, i.e. it should work for every <code>div</code> dimension and in all major browsers. I mean center alignment.</p>
  
  <p>I thought to make the horizontal alignment using:</p>
  
  <pre><code>margin-left: auto;
  margin-right: auto;
  </code></pre>
  
  <p>like I did <a href="http://jsfiddle.net/cdTQw/" rel="noreferrer">here</a>.</p>
  
  <p>Is this a good cross browser solution for horizontal alignment ?</p>
  
  <p>How could I do the vertical alignment ?</p>