vertical-align

An inline, inline-block, or table-cell box's vertical alignment is controlled by the vertical-align CSS property.

Example

Initial value baseline
Applies to inline, inline-block and table-cell elements

Syntax

  
vertical-align: middle;
  

Values

Aligns the baseline of the element with the baseline of its parent.
Aligns the baseline of the element with the subscript-baseline of its parent.
Aligns the baseline of the element with the superscript-baseline of its parent.
Aligns the top of the element with the top of the parent element's font.
Aligns the bottom of the element with the bottom of the parent element's font.
Aligns the middle of the element with the baseline plus half the x-height of the parent.
Aligns the baseline of the element to the given length above the baseline of its parent. A negative value is allowed.
Aligns the baseline of the element to the given percentage above the baseline of its parent, with the value being a percentage of the line-height property. A negative value is allowed.
Aligns the top of the element and its descendants with the top of the entire line.
Aligns the bottom of the element and its descendants with the bottom of the entire line.
Aligns the baseline of the cell with the baseline of all other cells in the row that are baseline-aligned.
Aligns the top padding edge of the cell with the top of the row.
Centers the padding box of the cell within the row.
Aligns the bottom padding edge of the cell with the bottom of the row.

Browser support

vertical-align1121441

We use cookies to improve your experience. Learn more in our Privacy policy.

×