I need to vertically align my form in the middle of my first div. I have it centered horizontally but I can't get it to align in the middle vertically as well. Basically even distance from the top and bottom.
<div id="login" style="position:absolute; width: 300px; height: 100px; z-index: 15; top: 50%; left: 50%; margin: -50px 0 0 -150px; background-color: #d0e9fc; border: 1px solid #B5BCC7;">
<div align="center" style="vertical-align: middle;">
<form th:action="@{/login}" method="post">
<table>
<tr>
<td>Username:</td>
<td>
<input type="text" name="username" id="username" />
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type="password" name="password" id="password" />
</td>
</tr>
<tr>
<td colspan="2">
<input class="sButton" type="submit" value="Sign in" label="Sign In" id="submitButton" />
</td>
</tr>
</table>
</form>
</div>
</div>