title: HTML - Vertically Align a Table
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/437333/how-to-vertically-align-a-table-in-css">How to Vertically Align a Table in CSS</a>  </p>
  </blockquote>
  
  
  
  <p>I would like to place my table smack dab in the center of a page. IT is easy horizontally align it just using </p>
  
  <pre><code>&lt;table align="center"&gt;&lt;/table&gt;
  </code></pre>
  
  <p>But it will not allow this:</p>
  
  <pre><code>&lt;table align="center" valign="center"&gt;
  </code></pre>
  
  <p>I also cant put the valign in a div because it is not a valid attribute.</p>
  
  <p>I have the idea of making a cell take up an the entire page then using:</p>
  
  <pre><code>&lt;Table align="center" width="100%"&gt;
  &lt;tr&gt;&lt;td valign="middle" height="100%"&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>But that too does not work because my <code>&lt;td&gt;</code> does not take up the entire page. When I set its height to 100% it only takes up the amount of space necessary.</p>
  
  <p>Any Ideas? CSS code would be great help also.</p>