Aligning a Cell’s Contents

By default, a cell’s contents are aligned two ways: horizontally to the left and vertically in the middle. When you’re designing a liquid layout, in which cells should stretch out over an extended browser window, it’s particularly important to specify where things should be aligned.

Figure 16.31. We need the middle image in the logo bar to stay centered and the right image to stay to the right regardless of the browser window size. The left navigation items should be at the top of their cell, not the middle, which is the default.

To align the contents of cells with (X)HTML:

1.
Place the cursor in the initial tag ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.