Formatting elements: Alignment (About vertical alignment)

Last week I discussed horizontal alignment, and this week I’ll discuss vertical alignment.  Next week I’ll cover cell margins, which is the third of the three things which affect how the text in a cell relates to the borders of the cell.

Vertical alignment is usually a choice between top, middle, and bottom.  As with left/center/right horizontal alignment, top alignment puts the top of the tallest possible character at the top of the cell. I say tallest possible because “ac” and “ab” would be in the same vertical location despite the fact that the “b” in “ab” is taller than either of the characters in “ac”.  Similarly, bottom alignment puts the bottom of the lowest possible character (e.g. g, j, p, q, y) at the bottom of the cell.  Middle alignment, predictably, puts the text about halfway between the top and bottom.  It’s worth noting that most spreadsheets have the default row height set so that if you use the default font, etc., there is no visual difference between top, middle, and bottom vertical alignment.

3 kinds of
vertical
alignment
Top Middle Bottom

Vertical alignment comes up a lot less frequently than horizontal alignment. There’s really only three times I use it.

The first case is when I have, for some reason, a row of information that’s taller than normal. This can happen when one of the pieces of information, perhaps the row label, has been wrapped so that it takes up more than one line. The default vertical alignment might be bottom, but the eye likes to follow the first line it sees, just like it did for all the other rows. It’s like a paragraph. We don’t have a problem with a short line at the bottom of the paragraph, but we’d be confused if the paragraph started with one. So I make sure that the vertical alignment is set to “top”.

Default vs top vertical alignment in rows with 1 multi-line cell.
Default
vertical
alignment
All the text is down here
Top
vertical
alignment
This text is easier to read.

The second case is when I have a pair of row headers. Like with the table with the student grades in the border examples, the student names are in one column, and the types of grades are in a second one. The way I arranged it is fine for only a few rows, but if there’s more it can get harder to visually associate the student name with all the grades that belong to it. In that case it can be good to merge all the cells in the first column that belong to the same student, and vertically align the student name in the middle. It’s not as visible at the top, but it’s a whole lot more visible at the bottom.

Top vs middle vertical alignment for dual-layer row headers with many sub-headers.
Student Name Subject Wk 1 Wk 2 vs. Student name Subject Wk 1 Wk 2
Alex Math 96 71 Alex Math 96 71
History 52 70 History 52 70
English 96 68 English 96 68
Science 78 59 Science 78 59
P.E. 54 85 P.E. 54 85
Art 79 72 Art 79 72
Bobby Math 96 71 Bobby Math 96 71
History 52 70 History 52 70
English 96 68 English 96 68
Science 78 59 Science 78 59
P.E. 54 85 P.E. 54 85
Art 79 72 Art 79 72

The third case, like the first case, also happens when there’s a row that’s more than one line tall, for whatever reason. However, whereas most rows are conceptually tied together, the header row isn’t. In the example above, all of the items in most of the rows are connected to all the other items in that row. For example, all of the values in the row labelled “Bobby” and “Math” are Bobby’s math grades. Likewise, all of the values in the row labelled “Alex” and “Hisotry” are Alex’s history grades. However, all the values in the very first row aren’t “Student names” — they’re column headers. So in cases like this, where it’s more important to have unity with the column than it is to have unity with the row, I make sure that the text is bottom-aligned, to keep it as close to the text it’s relevant to as possible.

Top vs bottom vertical alignment for column headers of varying heights.
Student Name Subject Wk 1 Wk 2 vs. Student name Subject Wk 1 Wk 2
Alex Math 96 71 Alex Math 96 71
History 52 70 History 52 70