Widely availableSupported across all major browsers. Safe to use in production.

Overview

The vertical-align CSS property sets the vertical alignment of inline, inline-block, and table cell elements. It has no effect on block-level elements.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
1
12
1
1
18
1
baseline
1
12
1
1
18
1
bottom
1
12
1
1
18
1
middle
1
12
1
1
18
1
sub
1
12
1
1
18
1
super
1
12
1
1
18
1
text-bottom
1
12
1
1
18
1
text-top
1
12
1
1
18
1
top
1
12
1
1
18
1
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

CSS
.icon { vertical-align: middle; }
.superscript { vertical-align: super; }
td { vertical-align: top; }

Live demo

vertical-align: middle

CSS Vertical-align: middle demo.

PreviewFullscreen

vertical-align: super

CSS Vertical-align: super demo.

PreviewFullscreen

tableselinside

CSS tableselinside demo.

PreviewFullscreen

Use cases

  • Using vertical-align

    The vertical-align CSS property sets the vertical alignment of inline, inline-block, and table cell elements. It has no effect on block-level elements.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.

Powered by web-features