Selecting Table Elements
Before we begin formatting the page using a table, it's important to touch on some important concepts, including a topic as simple as selecting the table and elements such as rows and cells within the table. As your designs become more and more complex, you'll begin to work with numerous tables within a page, including tables within table cells, also known as nested tables. When that time comes, the skills you learn within this section will become invaluable.
There are numerous ways to select a table:
- You can select the table by clicking, holding the cursor on the page, and then dragging it into the table.
- You can place your cursor into any cell within the table, at which point the Table Widths Visual Aid appears. From the Table Widths Visual Aid's menu, you can choose the Select Table as shown in Figure 4.5.
Figure 4.5 Choose the Select Table option from the Table Widths Visual Aid's list.
- You can place your cursor within a cell and choose the <table> tag from the Tag Selector within the Document window's status bar.
- You can right-click (Control-click) within a cell to access the context menu and then choose the Select Table option from the Table submenu shown in Figure 4.6.
Figure 4.6 You can select a table by choosing Table, Select Table option from the contextual menu.
- You can choose Modify, Table, Select Table.
- You can hold down the Ctrl () key and select the outer border of the table. You'll notice that as you roll over the outer border of the table, it highlights red. Clicking after you've rolled over it will select the table.
Whatever method you choose from the preceding list, the result is the same—the table is selected. This is obvious because of the black border that is placed around the table. You can also select individual rows and columns by choosing from one of the following methods:
- By placing your cursor either just to the left of the table row or just above the table column, you can select a row or column, respectively. Doing so changes the cursor to a black arrow and also highlights the row or column in red. A column has been selected in Figure 4.7. Clicking the mouse will select the row or column and highlight the element(s) with the same black border you saw when you selected the table.
Figure 4.7 Place your cursor just to the left of the row to select a row or just above the column to select a column. The cursor will change to an arrow, and the row or column will be highlighted.
- By placing your cursor within any cell and choosing the <tr> tag from the Tag Selector, you can select that row. You can also select an individual cell by placing your cursor within the cell and choosing the <td> tag from the Tag Selector.
- Hold down the Ctrl () key and select an individual cell. You'll notice that as you roll over a cell, it highlights red. Clicking the cell after you've rolled over it will select it.
It's important to note that the previous methods will also work for selecting multiple rows, columns, and cells. For instance, if you'd like to select 3 rows, you can place your cursor just to the left of the first row you want selected, click, hold, and then drag either up or down to select multiple rows. The same method works for selecting multiple columns as well. Additionally, you can select multiple cells by holding the Ctrl key and then choosing the cells that you want selected.