Claris Home Page FAQ
Table Questions
Back to Main FAQ
Last update 1/15/99.

MacOS 8 - Buy It Now
Join the Mac OS 8 Web Campaign!


1. How do I change the width or height of cells in a table?

2. Why can't I make a table with more rows and columns?

3. Why does the Alignment pop-up menu in the Table/Object Editor show only the vertical alignment options and not the horizontal ones.

4. How can I set the background of a table or individual cells?

5. How do I add rows or columns to a table?

6. Why do some of my cells not show up in my browser?


1. Question: How do I change the width or height of cells in a table?

Answer: First, remember that most browsers size a table according to its content. Often times, it is best to leave it up to the browser, as it can accommodate your page to the size of the window. Sometimes you do want more complete control, so below are several methods. They work a bit differntly, and have different advantages.

Changing Row Hight and Column Width

CHP 2.0x and 3.0 - Both these versions have made it easy to change the hight of rows and the width of columns. Simply select a cell in the row or column, then open the object editor. In CHP 2.0, you need to make sure the palette is completely expanded by clicking on the little blue triangle in the lower right corner of the palette. In CHP 3.0, click on the Cell tab at the top of the palette.

We are interested in the width and height field in the Cell section. If a field is empty, that means it will be up to the browser's discretion (in CHP 3.0, the pop-up will also read "Auto"). Otherwise, select either Pixels or Percent from the pop-up, and enter the desired size. Pixel settings are the raw number of pixels on the screen. Percent settings are calculated as a percentage of the size of the object which contains the table, whether it is another table, a frame, or the browser's window.

You can also adjust the pixel height and width of cells in a table by dragging the cell's border. When you place your cursor over a border, you will notice it changes into a resize symbol. Click and drag to change the dimension.

CHP 1.0xHeight and Width HTML tags - In the original verssion of CHP, you need to edit the HTML for the table in order to change width and height. Select the cell whose height or width you want to change (changing the height will affect all cells in that row; changing the width will affect all cells in that column). In the Extra HTML field, type height=y or width=x. This will set the cell height to y or the cell width to x (in pixels,or in percent if you add the % sign).

You can also go the HTML route to better control the outcome. (from Ruth Kahn <contact@bytesandpieces.com>)

If you go to the 3rd icon (edit HTML source) you will see your table in raw HTML. Find the TH or TD tag for the row or column that you want to adjust. Enter Width=X where x is equal to the absolute value in pixels or a percentage of the whole table (you can also do Height=x)inside the tag. (for example (TD Width=45) This will change the size of all the cells in the column or row (height).

[snip]

Ruth Kahn

Neither of these methods will display in CHP.

Cell-Spanning

Cell spanning is the stretching of one cell across several rows and/or columns It is an easier method to make wider or taller cells and is very useful in creating certain effects on your web pages. First make a table with the Table command in the Insert menu.In the Object Editor/Table window, add some rows and columns so you have more than you actually plan to use.

 

One cell selected in the middle of a table

Select a cell in the table, and drag one of the squares in the outline down, right, or diagonally. Once the cell spans the cells you wish it to span, release the mouse button. Now, the contents of the cell will appear in the entire area you indicated.

One cell spanned across four cellsTOP


2. Question: Why can't I make a table with more rows and columns?

Answer: There are limits to the number of rows and columns CHP will handle. These limits were increased in CHP 2.0 after suggestions from users. Remember gowever that when you create tables with such large numbers of cells, CHP becomes very sluggish and will freeze up for 10 seconds

limits the number of rows to 100 and the number of columns to 25.

limits the number of rows to 50 and the number of columns to 25.

Using a greater number of rows and columns

If you want a greater number of rows, you must edit the HTML in another program, such as a text editor (SimpleText, BBEdit, NotePad) or use multiple tables.

For example:

Table with 50 rows

and 25 columns

Table with 50 rows

and 25 columns

Table with 50 rows

and 25 columns

Table with 50 rows

and 25 columns

Set the spacing, padding, and border of the main table to 0, and you have a 100 cell by 50 cell table.

TOP


3. Question: Why does the Alignment pop-up menu in the Table/Object Editor show only the vertical alignment options and not the horizontal ones?

Answer: This is a mistake in CHP's design. The Alignment pop-up menu will set the VALIGN= attribute properly using the four possible settings top|middle|bottom|baseline.

If you want to align your text horzontally, use CHP's horizntal alignment buttond in the toolbar.

Until the next version of CHP, if you want to align the content of your cells horizontally, you will have to add the following in the Extra HTML field for the cell : align=left|center|right. (Use one of the three options) Your horizontal alignment will not display in CHP, but will show up in your WWW browser. TOP


4. Question: How can I set the background of a table or individual cells?

Answer: Luckily Home Page 3.0 has improved in this area.

Table Background

Select the table and open the Object Editor. Click on the Table tab at the top of the palette. In the middle of the pallete, you will find a control for the Table Color. To change the table color, click on the color pop-up menu directly to the right, and select a color. You can get access to the standard Macintosh Color Picker by selecting Other in the color pop-up.

Cell Background

Select the cell and open the Object Editor. Click on the Cell tab at the top. In the middle of the palette, you will find a control for Cell Color. Below it is a control for Row Color. Use the pop-up menu to set the color.

Select the table or individual cell you wish to set the background of. Open the Object Editor and make sure the palette is fully expanded (that is, the little arrow on the left side is pointing down). To set the background for the whole table, click in the upper Extra HTML field; to set the background for just the cell, click in the lower Extra HTML field. Now type bgcolor= and a color designation (this can be either in the RRGGBB form or the name form, see below for more info).

RRGGBB form is the most reliable, because all graphical browsers which display background colors can understand it. To get the RRGGBB number for a particular color, open Edit:Document Options and select "Colors and Backgrounds" from the pop-up menu. Click on any colored box (don't click on a setting you have changed from the default, because your custom color will be changed), and you will get the standard Macintosh Color Picker or on PCs, something else. Set the color to the desired background color, and click OK on all the dialogs. Now switch to HTML Source mode, and find, somewhere within the first couple of lines, the <body> tag. Inside the body tag you will find an additional argument, something like VLINK= "#4500FF". Copy the part within the quotes, and use that as the color designation.

The other form is supported only by Netscape and a handful of other browsers, so there are no guarantees. But it is much simpler. Just add "blue" or "red" etc. TOP


5. Question: How do I add and delete rows or columns in a table?

Answer: To add rows or columns, double-click the table to get the object editor, then select a cell above or to the right of where you want the new row/column. Click the Add Row or Add Column button in the Editor. To delete, select a cell in the row or column which you want to delete, and click the Remove Row or Remove column in the object editor. TOP


6. Question: Why do some of my cells not show up in my browser?

Answer:Many browsers simply choose to ignore empty table cells. Therefore, if there is nothing in the cell it will not appear, even if you have sized it, given a background color of image, or spanned it across adjoining cells. Usually, the only thing you need to do is put a invisible character, such as a non-breaking space, into the cell. To type a non-breaking space, hold down the option key while hitting the space bar. TOP


Created by: Marcin Jeske (jeskem@ee.pdx.edu)

 Made with Macintosh and Claris Home Page