Example
A simple vertical-align property example:
Laboratory
description & Usage
To determine the vertical alignment of an element, we use the Vertical-align property.
Browser compatibility and Support
# |
Chrome |
Edge |
Firefox |
Safari |
Opera |
Vertical-align |
|
|
|
|
|
Values
Values |
Description |
baseline
|
This value is aligned with the parent baseline and is the default.
|
sub
|
This value is aligned with the subtitle baseline.
|
super
|
This value is aligned with the parent baseline.
|
top
|
This value is aligned with the topmost element of the line.
|
text-top
|
This value aligns with the top of the parent element.
|
middle
|
This value is aligned in the middle of the parent element.
|
bottom
|
This value is aligned with the lowest element of the line.
|
text-bottom
|
This value aligns with the bottom of the parent element.
|
initial
|
Adds this value to its default property.
|
inherit
|
It inherits this value from its parent tag.
|