CSS Vertical Align
Next ❯CSS Counter
- turned_in_notVertical Align Property
- vertical-align
- Only the cell content position will be affected within the cell, not the cell itself (when applied to the table cells)
Chekout me span Normal Text
vertical-align: |
span {
vertical-align:baseline;
background-color:yellow;
}
Vertical Alignsubject
Some text | My position is changing |
vertical-align: |
#ver2a {
vertical-align:middle;
}
Vertical Alignsubject
Property Values
Value | Used to |
---|---|
baseline | (default) Align the baseline of the element with the baseline of the parent element |
sub | Align the element as subscript |
super | Align the element as superscript |
top | Align the top of the element with the top of the tallest element on the line |
bottom | Align the bottom of the element with the lowest element on the line |
middle | Align the element in the middle of the parent element |
text-top | Align the top of the element with the top of the parent element |
text-bottom | Align the bottom of the element with the bottom of the parent element |
length | Align the element vertically by the specified length (like in: px, em) from baseline |
% | Align the element vertically respect to the % of "line-height" property value |
❮ Prev CSS Float
Next ❯CSS Counter