Menu Samaritan's Purse

VERTICAL-ALIGN

The vertical-align property affects the vertical positioning inside a line box of the boxes generated by an inline-level element.

SYNTAX

CSS

vertical-align: value;

JS

object.style.verticalAlign = "value";

VALUES

<'vertical-align'> = baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit
baseline

Align the baseline of the box with the baseline of the parent box. If the box does not have a baseline, align the bottom margin edge with the parent's baseline.

sub

Lower the baseline of the box to the proper position for subscripts of the parent's box.

super

Raise the baseline of the box to the proper position for superscripts of the parent's box.

top

Align the top of the aligned subtree with the top of the line box.

text-top

Align the top of the box with the top of the parent's content area.

middle

Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.

bottom

Align the bottom of the aligned subtree with the bottom of the line box.

text-bottom

Align the bottom of the box with the bottom of the parent's content area.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<length>

Specifies the length using a number followed by a unit of measurement.

inherit

Specifies the same value as the parent.

INITIAL

baseline

EXAMPLES

BASELINE

SUB

SUPER

TOP

TEXT-TOP

MIDDLE

BOTTOM

TEXT-BOTTOM

PERCENTAGE

LENGTH

JS

World Wide Web Consortium (W3C)