Spanning a Cell across Rows


Creating a cell that spans more than one row is essentially the same as spanning cells over more than one columnjust from another direction.

Figure 16.47. I can make the left navigational bar span both rows, and then I have to adjust the second row's cell so that it no longer tries to span two columns.


To span a cell across two or more rows:

1.

When you get to the point in which you need to define the cell that spans more than one row, type <td.

2.

Type rowspan="n">, where n equals the number of rows the cell should span.

3.

Type the cell's contents.

4.

Type </td>.

5.

Complete the rest of the table. If you define a cell with a rowspan of 2, you will not need to define the corresponding cell in the next row. If you define a cell with a rowspan of 3, you will not need to define the corresponding cells in the next two rows.

Figure 16.48. Now the left navigational bar spans both rows and the copyright row is a simple cell.


Tips

  • Each column in a table must have the same number of cells defined. Cells that span across rows count for as many cells as the value of their rowspan attribute.

  • There is no CSS alternative for rowspan.





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net