CSS Vertical-align Property

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

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]
body {
  vertical-align: middle;
}

Inherited? NO!

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.