CSS vertical-align
The CSS vertical-align property is used for aligning elements vertically (hence "vertical align").
| Syntax: |
vertical-align: <value>
|
| Possible Values: |
- baseline
Aligns the baseline of the element with it's parent's baseline.
- middle
- sub (subscript)
- super (superscript)
- text-top
Aligns the top of the element with the top of the parent element's font.
- text-bottom
Aligns the bottom of the element with the bottom of the parent element's font.
- <percentage>
Raises or lowers the element by the percentage value. 0% is baseline. Can be a negative value.
- <length>
Raises or lowers the element by the value. 0cm is baseline. Can be a negative value.
- top
Aligns to the top of the tallest element on the line.
- bottom
Aligns to the bottom of the lowest element on the line.
- inherit
|
| Initial Value: |
baseline
|
| Applies to: |
Inline level and table cells
|
| Inherited: |
No
|
| Media: |
Visual
|
| Example: |
td { vertical-align: text-top }
|
Enjoy this website?
- Share
- Add this page to your Favorites
- Link to this page (copy/paste into your own website or blog):
- Link to Quackit using one of these banner ads.
- Help support Quackit by making a donation
Oh, and thank you for supporting Quackit!