Copying and Pasting Table Cells


You now have two tables: The first table contains the titles for each column, and the second table contains the data. Now you need to combine the two tables. You can copy and paste multiple table cells at the same time, which preserves the cell's formatting if there is any, or you can copy and paste only the contents of the cell.

Cells can be pasted at an insertion point or by replacing a selection in an existing table. If you want to paste multiple table cells, the contents of the Clipboard (a system feature on both Macintosh and Windowsthe Clipboard is not a part of Dreamweaver) must exactly match the structure of the table or the selection in the table that the pasted cells will replace. You can copy one cell and paste it to replace a selected cell, but you can't copy two cells and paste them to replace a single cell. The number and orientation of the cells that you copy must match the number and orientation of the cells you plan to replace. You can paste multiple cells into a single cell, but the end result will be multiple cells, as you'll see in the following.

1.

In the index.html document, select all the cells in the second table by clicking the upper-left cell and dragging across the cells to the lower-right cell.

The selected cells are now outlined with black borders. Selecting the cells in this manner selects the cells themselves, not the entire table.

2.

Choose Edit > Copy.

Tip

You can also use the keyboard shortcuts Cmd+C (Macintosh) or Ctrl+C (Windows).

To be cut or copied, the selected cells must form a rectangle. For example, you can't select six cells in the top row and four cells in the bottom row.

3.

Click once inside the first cell of the second row in the top table.

You might need to click a visible portion of the top table first or click in an area of the page that is outside both tables to show the bottom row if the table header of the second table obscures it.

This empty cell is where the copied cells will be pasted.

4.

Choose Edit > Paste.

Tip

You can also press Cmd+V (Macintosh) or Ctrl+V (Windows) to paste the contents of the Clipboardthe cells you copied in Step 2.


All the cells from the second table are inserted into the first table. Your first table will now look like the following example.

Click outside the table to deselect the cells.

Note

If you are pasting entire rows at the end of a table (as in this exercise), the rows are added to the table. If you are pasting to replace one or more cells, the contents of the selected cell(s) are replaced if the Clipboard contents match the structure of the selected cell(s). If you are pasting outside a table, the rows, columns, or cells are used to define a new table.

If you need to remove the contents of cells, but want to leave the cells themselves intact, select one or more cells (but not an entire row or column); then choose Edit > Clear or press Delete. If you need to remove an entire row, drag across all the cells in the row to select it and press Delete.





Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

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