Vertical alignment
Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
Change the alignment of elements with the vertical-alignment
utilities. Please note that vertical-align only affects inline, inline-block, inline-table, and table cell elements.
Choose from .align-baseline_sth
, .align-top_sth
, .align-middle_sth
, .align-bottom_sth
, .align-text-bottom_sth
, and .align-text-top_sth
as needed.
With inline elements:
baseline
top
middle
bottom
text-top
text-bottom
<span class="align-baseline_sth">baseline</span>
<span class="align-top_sth">top</span>
<span class="align-middle_sth">middle</span>
<span class="align-bottom_sth">bottom</span>
<span class="align-text-top_sth">text-top</span>
<span class="align-text-bottom_sth">text-bottom</span>
With table cells:
baseline | top | middle | bottom | text-top | text-bottom |
<table style="height: 100px;">
<tbody>
<tr>
<td class="align-baseline_sth">baseline</td>
<td class="align-top_sth">top</td>
<td class="align-middle_sth">middle</td>
<td class="align-bottom_sth">bottom</td>
<td class="align-text-top_sth">text-top</td>
<td class="align-text-bottom_sth">text-bottom</td>
</tr>
</tbody>
</table>