Formatting Pages

Working With Tables

Back to Introduction to Nvu Home | Inserting a Table | Changing a Table's Properties | Adding/Deleting Cells | Merging Cells

Tables are useful for organizing text, pictures, and data into formatted rows and columns.

To insert a table:

1. Click to place the insertion point where you want the table to appear.


2. Click the Table button on the Button toolbar . The Insert Table dialog box appears.

There are three tabs in the Insert Table dialog box: Quickly, Precisely, and Cell.

The Quickly tab allows you to drag your mouse over a picture of a table to determine how many rows and columns you want.

The Precisely tab allows you to type the number of rows and columns you want. You can also enter a size for the table width, and select either percentage of the window or pixels. A third option available on this tab allows you to enter a number for the border thickness (in pixels); enter zero for no border or an invisible table.


The Cell tab allows you to determine the horizontal and vertical alignment of elements within cells.

Below are two examples of tables. The first table is a 2 column by 2 row table with a border of 1. This table would be visible on a web page. The second table is a 2 column by 2 row table with a border of 0. This table would be invisible when viewed on a web page. Note: Nvu uses a red dotted line to indicate tables with a zero border; the dotted line disappears when the page is viewed in a browser.

Table 1

Table 2


Click OK to confirm your settings and view your new table.



Changing a Table's Properties

This section describes how to modify properties that apply to an entire table as well as the rows, columns, or individual cells within a table. If you are not currently viewing the Table Properties dialog box, follow these steps:

1. Select the table, or click anywhere inside it.
2. Click the Table button on the toolbar, or open the Table menu and choose Table Properties. The Table Properties dialog box contains two tabs: Table and Cells.
3. Click the Table tab to edit these properties:


Size: Use this to specify the number of rows and columns. Enter the width of the table and then choose "% of window" or "pixels." If you specify width as a percentage, the table's width changes whenever the Nvu window's or browser window's width changes.

Borders and Spacing: Use this to specify, in pixels, the border line width, the space between cells, and the cell padding (the space between the contents of the cell and its border).

Table Alignment: Use this to align the table within the page. Choose an option from the drop-down list.

Background Color: Use this to choose a color for the table background, or leave it as transparent.

4. Click Apply to preview your changes without closing the dialog box, or click OK to confirm them.

To view, change, or add properties for one or more cells:

1. Select the row, column, or cell, then open the Table menu and choose Table Properties. The Table Properties dialog box appears.
2. Click the Cells tab to edit the following properties:

Selection: Choose Cell, Row, or Column from the drop-down list. Click Previous or Next to move through rows, columns, or cells.

Size: Type a number for Height and Width, and then choose "% of table" or "pixels."

Content Alignment: Select a vertical and horizontal alignment type for the text or data inside each cell.

Cell Style: Select Header from the drop-down list for column or row headers (which centers and bolds the text in the cell); otherwise choose Normal.

Text Wrap: Select "Don't wrap" from the drop-down list to keep text from wrapping to the next line unless you insert a paragraph break. Otherwise, choose Wrap.

Background Color: Select a color for the cell background or leave it as transparent.



3. Click Apply to preview your changes without closing the dialog box, or click OK to confirm them.



Adding and Deleting Rows, Columns, and Cells

Nvu allows you to quickly add or delete one or more cells, columns, or rows in a table. In addition, you can set options that allow you to maintain the original rectangular structure or layout of the table while you perform editing tasks.

To add a cell, row, or column to your table:

1. Click inside the table where you want to add a cell (or cells).
2. Open the Table menu and then choose Insert.
3. Choose one of the cell groupings. (You can also insert a new table within a table cell.)


To delete a cell, row, or column:

1. Click a row, column, or cell to place the insertion point. Or, select neighboring cells to delete more than one row at a time. To select neighboring cells, drag over the cells you want to select. To select individual cells in a table, hold down the Ctrl key (Windows and Linux) or the Command key (Macintosh OS) and click on the cells you want to select.
2. Open the Table menu and choose Delete.
3. Choose the item you want to delete.




To join (or merge) adjacent cells:

* Select adjacent cells by dragging over them.
* Open the Table menu, and choose Join Selected Cells.




Moving, Copying, and Deleting Tables

To move a table:

1. Click inside the table.
2. Open the Table menu, choose Select, and then choose Table.


* To copy or move the table: Use the Edit menu's cut, copy, and paste options.

* To delete the table: Open the Table menu again, choose Delete, and then choose Table.