May 06, 2021 CSS Reference Manual
The vertical-align property sets the vertical alignment of an element.
Default: | baseline |
---|---|
Inherited: | no |
Version: | CSS1 |
JavaScript syntax: | object .style.verticalAlign="bottom" |
The numbers in the table support the first browser version number of the property.
Attributes |
|
|
|
|
|
---|---|---|---|---|---|
vertical-align | 1.0 | 4.0 | 1.0 | 1.0 | 4.0 |
Value | Describe |
---|---|
baseline | Default. The element is placed on the baseline of the parent element. |
sub | Vertically align the lower label of the text. |
super | Vertically align the upper label of the text |
top | Aligns the top of the element with the top of the highest element in the row |
text-top | Aligns the top of the element with the top of the parent element font |
middle | Place this element in the middle of the parent element. |
bottom | Aligns the top of the element with the top of the lowest element in the row. |
text-bottom | Aligns the bottom end of the element with the bottom end of the parent element font. |
length | |
% | This element is arranged using the percentage value of the line-height property. Negative values are allowed. |
inherit | Specifies that the value of the vertical-align property should be inherited from the parent element. |
CSS tutorial: CSS Text ( text).