Name

vertical-align

Synopsis

Specifies the vertical alignment of an inline element’s baseline relative to the baseline or line box of the line in which it resides. When used with table cells, only the values baseline, top, middle, and bottom apply.

Values:

baseline | sub | super | top | text-top | middle |
text-bottom | bottom | <percentage> | <length> | inherit

Initial value:

baseline

Applies to:

Inline elements and table cell elements.

Inherited:

No.

Percentages:

Refer to the line-height of the element itself.

Computed value:

For percentage and length values, the absolute length; otherwise, as specified.

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.