Centering in the Viewport with Table
This container div is centered both horizontally and vertically. It may be used to hold the page.
A single celled table is used, taking advantage
of the default
{vertical-align: middle}
property
of the <td>
element. I consider
this use of the <table>
element
for layout purposes to be appropriate.
A pure css method requires non-intuitive hackery to center vertically in IE with css. The additional complexity may cause maintenance issues, if the next guy doesn't grok the hack.