HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

vertical-align

Description

The vertical-align property for CSS 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

1 · baseline

2 · sub

3 · super

4 · top

5 · text-top

6 · middle

7 · bottom

8 · text-bottom

9 · percentage

10 · length

11 · JS