By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

CSS Vertical-align Property

Reference on the css Vertical-align Property. Includes a list of possible values, and example of use.

Edited: 2015-02-21 15:18

The CSS Vertical-align property allows to align the text vertically.

Possible Values

  • baseline (Default) [baseline of the parent box]
  • middle [Middle of parent element]
  • sub [As subscript]
  • super [As superscript]
  • text-top
  • text-bottom
  • % [A percentage of the "line-height" value "%0" is same as baseline]
  • length ["0cm" is same as baseline]
  • top [top of box; with top of, line box]
  • bottom [bottom of box; with bottom of, line box]

CSS vertical-align example

body {
  vertical-align: middle;

Inherited? NO!