Page 18 of 23PREVNEXT

HTML Tables II: Table and cell widths

Spacer GIF inside a table

A spacer GIF is keeping the left column propped open to 100 pixels.

Images, unlike text, don't wrap or vary depending on font size. So, that's where a spacer GIF can be handy in reliably keeping a cell propped open.

Because an image doesn't wrap, it will force the cell open to the width you need. This will ensure that it won't get squished by neighboring cells.

You might wonder why you wouldn't use nonbreaking spaces to keep a cell propped open. Technically you could do this. However, the nonbreaking space is actually text. Since text size can vary from computer to computer, the cell wouldn't be propped open to the same width on all computers.

Note    Any image will keep a cell propped open. A spacer just works well because it is invisible in the browser.

Page 18 of 23PREVNEXT