core-logo

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 .c-align-baseline, .c-align-top, .c-align-middle, .c-align-bottom, .c-align-text-bottom, and .c-align-text-top as needed.

With inline elements:

baseline top middle bottom text-top text-bottom
<span class="c-align-baseline">baseline</span>
<span class="c-align-top">top</span>
<span class="c-align-middle">middle</span>
<span class="c-align-bottom">bottom</span>
<span class="c-align-text-top">text-top</span>
<span class="c-align-text-bottom">text-bottom</span>

With table cells:

baseline top middle bottom text-top text-bottom
<table style="height: 100px;">
  <tbody>
    <tr>
      <td class="c-align-baseline">baseline</td>
      <td class="c-align-top">top</td>
      <td class="c-align-middle">middle</td>
      <td class="c-align-bottom">bottom</td>
      <td class="c-align-text-top">text-top</td>
      <td class="c-align-text-bottom">text-bottom</td>
    </tr>
  </tbody>
</table>