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:

<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

Popular posts from this blog

SharePoint Designer 2013 Approval Workflow with Comments

Change SharePoint server hostname and Web Application Names

SharePoint Search - Content Processing Pipeline Failed to Process the Item