Hello,
I am trying to vertically center some content via CSS. For the life of me, I cannot figure out the cause. Can someone tell me why the word "test" in the following HTML is always top-aligned no matter what I do?
<html>
<head>
<title>test</title>
</head>
<body>
<table border='0' cellpadding='0' cellspacing='0'>
<tr><td style='height:200px; width:300px; background-color:silver;'>
<div style='height:100%; width:100%; background-color:gray; text-align:center;'>
<div style='vertical-align:middle;'>test</div>
</div>
</td></tr>
</table>
</body>
</html>
Thank you very much for your help!