vertical-align - Why it sucks and how it is used
Okay so sometimes vertical-align just doesn't do what you expect, in fact it seems it rarely does.
Here is how to use it:
Or this works well:
Here is a link to the full explanation for it's intentions:
http://phrogz.net/CSS/vertical-align/index.html
Here is how to use it:
<td valign="middle"> <!-- but you shouldn't ever use valign --> </td>
<td style="vertical-align:middle"> ... </td>
<div style="display:table-cell; vertical-align:middle"> ... </div>
Or this works well:
DIV.container {
min-height: 10em;
display: table-cell;
vertical-align: middle }
Here is a link to the full explanation for it's intentions:
http://phrogz.net/CSS/vertical-align/index.html
Comments
Post a Comment