Name
vertical-align
Synopsis
This defines the vertical alignment of an inline element’s baseline with respect to the baseline of the line in which it resides. Negative length and percentage values are permitted, and they lower the element instead of raising it. In table cells, this property sets the alignment of the content of the cell within the cell box.
Values:
baseline
| sub
|
super
| top
|
text-top
| middle
|
bottom
| text-bottom
|
<percentage> | <length> | inherit
Initial value:
baseline
Applies to:
inline elements and table cells
Inherited:
no
Percentages:
refer to the value of line-height
for the element
Computed value:
for percentage and length values, the absolute length; otherwise, as specified
Note:
when applied to table cells, only the values
baseline
, top
,
middle
, and bottom
are
recognized
Get Cascading Style Sheets: The Definitive Guide, Second 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.