Vertical alignment

Source: https://getbootstrap.com/docs/6.0/utilities/vertical-align

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

To vertically center non-inline content (like <div>s and more), use our flex box utilities.

With inline elements:

<Example code={&lt;span class="align-baseline">baseline&lt;/span> &lt;span class="align-top">top&lt;/span> &lt;span class="align-middle">middle&lt;/span> &lt;span class="align-bottom">bottom&lt;/span> &lt;span class="align-text-top">text-top&lt;/span> &lt;span class="align-text-bottom">text-bottom&lt;/span>} />

With table cells:

&lt;tbody>
  &lt;tr>
    &lt;td class="align-baseline">baseline&lt;/td>
    &lt;td class="align-top">top&lt;/td>
    &lt;td class="align-middle">middle&lt;/td>
    &lt;td class="align-bottom">bottom&lt;/td>
    &lt;td class="align-text-top">text-top&lt;/td>
    &lt;td class="align-text-bottom">text-bottom&lt;/td>
  &lt;/tr>
&lt;/tbody>

</table>`} />

CSS

Sass utilities API

Vertical align utilities are declared in our utilities API in scss/_utilities.scss. Learn how to use the utilities API.