Style verticalAlign Property
Style verticalAlign Property
The verticalAlign property is used to either set or return vertical alignment of the content in an element.
Syntax:-
Its syntax is:- object.style.verticalAlign OR object.style.verticalAlign = value
Return:-
Its return is:- string having vertical alignment of content in the element
Further Explanation:-
Value | Description |
---|---|
length | Raises or lower an element by specified length. |
% | Raises or lower an element in a percent of the line-height property. |
baseline | Align baseline of element with baseline of parent element. |
sub | Aligns element as it is subscript. |
super | Aligns element as it is superscript. |
top | The top of element is aligned with top of tallest element on line. |
text-top | The top of element is aligned with top of parent element font. |
middle | The element is placed in middle of parent element. |
bottom | The bottom of element is aligned with lowest element on line. |
text-bottom | The bottom of element is aligned with bottom of parent element font. |
initial | Sets property to its default value. |
inherit | Inherits property from its parent element. |