Vertical alignment CSS properties are dependant on the display properties of the parent element. For example, aligning content vertically within a container relies on the container being set to display table-cell.
Vertical alignment
Options and behavior:
Baseline - Align the baseline of the element with the baseline of the parent element. This is default
Top - Align the top of the element with the top of the tallest element on the line
Text top - Align the top of the element with the top of the parent element's font
Middle - Align the element in the middle of the parent element
Bottom - Align the bottom of the element with the lowest element on the line
Vertical alignment properties
Set the vertical alignment of an element.
Important
Vertical alignment CSS properties are dependant on the display properties of the parent element. For example, aligning content vertically within a container relies on the container being set to display table-cell.
Vertical alignment
Options and behavior:
Baseline - Align the baseline of the element with the baseline of the parent element. This is default
Top - Align the top of the element with the top of the tallest element on the line
Text top - Align the top of the element with the top of the parent element's font
Middle - Align the element in the middle of the parent element
Bottom - Align the bottom of the element with the lowest element on the line
- Align the bottom of the element with the bottom of the parent element's font