|
11 | 11 | <h1>Long description for example showing how structurally |
12 | 12 | overlapping cells are rendered</h1> |
13 | 13 |
|
14 | | -<P>This diagram shows how the CSS table model causes structurally |
15 | | -overlapping cells to be rendered visually without overlap. |
16 | | -<strong>Note.</strong> The HTML table in this example is illegal since |
17 | | -HTML 4.0 states that tables cannot have overlapping cells. |
18 | | - |
19 | | -<P>The diagram depicts two renderings of the table specified in the |
20 | | -HTML example preceding the image. While some user agents may produce |
21 | | -the left rendering, CSS user agents may only produce the right |
22 | | -rendering. In both tables, cells have gray backgrounds and a black |
23 | | -border. Each contains a single integer label. Cells are separated from |
24 | | -each other by cell spacing. |
25 | | - |
26 | | -<P>The left table has a top row of four cells. The second cell spans |
27 | | -rows one and two. The second row of the table contains one cell that |
28 | | -spans columns one and two. Thus, two cells overlap at the cell in the |
29 | | -second row, second column. The overlap is depicted by a darker gray |
30 | | -background. |
31 | | - |
32 | | -<P>The right table has a top row of four cells. The second cell spans |
33 | | -rows one and two. The second row of the table contains one cell that |
34 | | -spans columns three and four. Thus, no cells overlap visually. |
| 14 | +<P>This example shows a difference between CSS's table model for HTML |
| 15 | +and for other document formats. The first, HTML, example is defined by |
| 16 | +HTML to be illegal, as it would lead to overlapping cells if HTML's |
| 17 | +rules for layout are followed. The CSS rules apply to other formats |
| 18 | +than HTML, and don't have this problem. |
| 19 | + |
| 20 | +<P>The diagram depicts how the two examples, the HTML one and the |
| 21 | +almost identical non-HTML one, might be rendered. The rendering of the |
| 22 | +HTML example is undefined, and one possible rendering is shown here, |
| 23 | +in the left half of the figure: it has two cells that overlap. The |
| 24 | +rendering of the non-HTML example is on the right, it follows the CSS |
| 25 | +rules and thus has no overlapping cells. |
| 26 | + |
| 27 | +<p>In both tables, cells have gray backgrounds and a black |
| 28 | +border. Each contains a single digit as label. Cells are separated |
| 29 | +from each other by cell spacing. |
| 30 | + |
| 31 | +<P>The left table has a top row of four cells, containing, resp. the |
| 32 | +digits "1", "2", "3", and "4". The second of these cells, the one with |
| 33 | +the digit "2" in it, extends into the row below. The second row of the |
| 34 | +table contains one cell, which contains the digit "5", and it spans |
| 35 | +columns one and two. Thus, the cell labeled "2" and the cell labeled |
| 36 | +"5" overlap in the second row, second column. The overlap is depicted |
| 37 | +by a darker gray background. |
| 38 | + |
| 39 | +<P>The right table has the same top row of four cells, labeled "1", |
| 40 | +"2", "3", and "4". The second cell again spans rows one and two. The |
| 41 | +second row of the table contains one cell, containing the digit "5", |
| 42 | +that spans columns three and four. Thus, no cells overlap, but the |
| 43 | +first cell of the second row is left empty. |
35 | 44 |
|
36 | 45 | <P><a href="../../tables.html#img-table-overlap">Return to image.</a> |
37 | 46 |
|
|
0 commit comments