--- title: vertical-align slug: Web/CSS/vertical-align translation_of: Web/CSS/vertical-align ---
La propiedad vertical-align
de CSS especifica el alineado vertical de un elemento en línea o una celda de una tabla.
{{cssinfo}}
vertical-align:
baseline
|sub
|super
|text-top
|text-bottom
|middle
|top
|bottom
| <percentage> | <length>
La mayoría de los valores de alinean verticalmente el elemento de forma relativa al elemento padre:
baseline
sub
super
text-top
text-bottom
middle
<length>
<percentage>
For elements that do not have a baseline, the bottom margin edge is used instead.
However, two values vertically align the element relative to the entire line rather than relative to its parent:
top
bottom
Negative values are allowed.
baseline
(and sub
, super
, text-top
, text-bottom
, <length>
, and <percentage>
)top
middle
bottom
Negative values are allowed.
img { vertical-align: bottom; }
Specification | Status | Comment |
---|---|---|
{{ SpecName('CSS3 Transitions', '#animatable-css', 'vertical-align') }} | {{ Spec2('CSS3 Transitions') }} | Defines visibility as animatable. |
{{ SpecName('CSS2.1', 'visudet.html#propdef-vertical-align', 'vertical-align') }} | {{ Spec2('CSS2.1') }} | Add the {{cssxref("<length>")}} value and allows it to be applied to element with a {{ cssxref("display") }} type of table-cell . |
{{ SpecName('CSS1', '#vertical-align', 'vertical-align') }} | {{ Spec2('CSS1') }} | Initial definition. |
Understanding vertical-align
, or "How (Not) To Vertically Center Content"