• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16.  Layout with Styles > Aligning Elements Vertically

Aligning Elements Vertically

If you have elements (like images) on your page that you would like aligned in the same way, you can use the vertical-align property to set the tag, or a class of the tag, accordingly.

To position text:

1.
Type vertical-align:

2.
Type baseline to align the element's baseline with the parent's baseline.

Or type middle to align the middle of the element with the middle of the parent.

Or type sub to position the element as a subscript of the parent.

Or type super to position the element as a superscript of the parent.

Or type text-top to align the top of the element with the top of the parent.

Or type text-bottom to align the bottom of the element with the bottom of the parent.

Or type top to align the top of the element with the top of the tallest element on the line.

Or type bottom to align the bottom of the element to the bottom of the lowest element on the line.

Or type a percentage of the line height of the element, which may be positive or negative.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint