One of the advantages of tables is that they provide vertical centering vertically. DIVs no. This is the case when I bite a bullet and add these ugly TPs and TDs.
<table cellspacing="0" style="width:300px;height:300px;border:1px solid black;"> <tr> <td style="vertical-align:middle;text-align:center;"> <img src="asdfasdf" alt="foo" /> </td> </tr> </table>
He called the one-second centering table and the ugly as it is, it works.
source share