You have a fair amount of control over tables in Web, including whether the table dimensions are absolute or relative, lots of formatting options, and other options. Setting Up How Tables Are Created By DefaultBefore you begin, complete table setup options first. If you're having problems with tables, it's probably because of a setting that's doing stuff you don't expect. Refer to Figure 15-7; open the window by choosing Tools > Options > HTML Document > Table. Figure 15-7. Setting table options
Quickstart: Using the Table Formatting Icons in the ToolbarThe table feature in Web is similar to Writer's, though not identical. When you select or insert a table (choose Insert > Table), the table object bar appears (Figure 15-8). Figure 15-8. Table object bar
Note If you don't see the table object bar, choose View > Toolbars and mark Object Bar. If it still doesn't appear, click the arrow at the far right of the object bar. Inserting a New TableTo insert a new blank or preformatted table, follow these steps.
Modifying Table DimensionsOnce you've got the table, here's how to tweak it using menus and the table object bar. Column/Row DimensionsSelect the cell, column, or row you want, and right-click. Choose Row, Column, or Cell to get options for modifying the width, etc. You also can click anywhere in the table and see the vertical bars marking each column. Drag them to change column width. The table generally wants to keep its full width and won't let you modify it via changing column width. You'll need to change the overall table dimensions. Table Dimensions
Formatting Text in a TableWhen you insert a table, the text object bar disappears and the table object bar replaces it. To get at the text formatting object bar when you're in a table, use the arrow at the far right side of the object bar. (If you can't see it, enlarge the window or click the small down arrow at the right side of the object bar.)
Just click the arrow circled in the above figure to switch from one object bar to the other. Once in a while, you'll click in a table and the table object bar won't appear. Again, just click the arrow to get the table object bar. Creating Nested TablesYou've got a table, but how do you put a table inside another table? If you put the cursor inside a table cell and choose Insert > Table, the table window pops up but on the Background tab. The ability to insert another table is grayed out. So you can fool the program into thinking you're not in a table by inserting a frame in that cell, then putting the nested table inside that frame.
The HTML source that's created looks like Figure 15-14 below. Figure 15-14 HTML source created from nested tables [View full width] <TABLE WIDTH=935 BORDER=1 CELLPADDING=5 CELLSPACING=4> <COL WIDTH=360> <COL WIDTH=120> <COL WIDTH=115> <COL WIDTH=159> <COL WIDTH=105> <THEAD> <TR VALIGN=TOP> <TH WIDTH=360 BGCOLOR="#cccccc"> <P><FONT FACE="Arial, sans-serif">Beginning Java</FONT></P> </TH> <TH WIDTH=120 BGCOLOR="#cccccc"> <P><FONT FACE="Arial, sans-serif">Intermediate Java</FONT></P> </TH> <TH WIDTH=115 BGCOLOR="#cccccc"> <P><FONT FACE="Arial, sans-serif">Distributed Java</FONT></P> </TH> <TH WIDTH=159 BGCOLOR="#cccccc"> <P><FONT FACE="Arial, sans-serif">Enterprise JavaBeans</FONT></P> </TH> <TH WIDTH=105 BGCOLOR="#cccccc"> <P><FONT FACE="Arial, sans-serif">Jini and Jiro</FONT></P> </TH> </TR> </THEAD> <TBODY> <TR VALIGN=TOP> <TD WIDTH=360> <P><IMG SRC="nestedtable_html_8bcd267.gif" NAME="Frame1" ALT="Frame1" ALIGN=BOTTOM></P> </TD> <TD WIDTH=120> <P>Visual Basic and C++ Programmers</P> </TD> <TD WIDTH=115> <P>.NET converts</P> <P>Java Certified Programmers</P> </TD> <TD WIDTH=159> <P>.NET converts and Web developers</P> </TD> <TD WIDTH=105> <P>Java Certified Architects</P> </TD> </TR> </TBODY> </TABLE> <P><BR><BR> </P> </BODY> </HTML> |