22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

current margins<br />

text text text previous paragraph text text above the table text text<br />

more text text text normal paragraph text text etc. etc.<br />

Table 72. This<br />

is the caption. It<br />

is right aligned.<br />

Also aligned at the<br />

bottom<br />

header header header<br />

cell cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

cell<br />

Diagram showing a centered table with the caption extending into the left<br />

margin, as a result of a negative ’margin-left’ property.<br />

17.5 Visual layout of table contents<br />

Like other elements of the document language [p. 30] , internal table elements<br />

generate rectangular boxes [p. 81] with content, padding, and borders. They do<br />

not have margins, however.<br />

The visual layout of these boxes is governed by a rectangular, irregular grid of<br />

rows and columns. Each box occupies a whole number of grid cells, determined<br />

according to the following rules. These rules do not apply to HTML 4.0 or earlier<br />

HTML versions; HTML imposes its own limitations on row and column spans.<br />

1. Each row box occupies one row of grid cells. Together, the row boxes fill the<br />

table from top to bottom in the order they occur in the source document (i.e.,<br />

the table occupies exactly as many grid rows as there are row elements).<br />

2. A row group occupies the same grid cells as the rows it contains.<br />

3. A column box occupies one or more columns of grid cells. Column boxes are<br />

placed next to each other in the order they occur. The first column box may<br />

be either on the left or on the right, depending on the value of the ’direction’<br />

property of the table.<br />

4. A column group box occupies the same grid cells as the columns it contains.<br />

5. Cells may span several rows or columns. (Although <strong>CSS2</strong> doesn’t define<br />

how the number of spanned rows or columns is determined, a user agent<br />

may have special knowledge about the source document; a future version of<br />

CSS may provide a way to express this knowledge in CSS syntax.) Each cell<br />

is thus a rectangular box, one or more grid cells wide and high. The top row<br />

of this rectangle is in the row specified by the cell’s parent. The rectangle<br />

must be as far to the left as possible, but it may not overlap with any other<br />

cell box, and must be to the right of all cells in the same row that are earlier<br />

in the source document. (This constraint holds if the ’direction’ property of<br />

253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!