<ef*****@epitome.com.sg> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi everyone
Sorry to ask such a simple question. I created a table with 18 columns-
16 of which represent weeks starting from 1 to 16. In each cell I have
a field which takes either a Null value or and "X". Since I only have
at most one (1)character, I would like to make the td with as small as
possible. I have placed width="5px" but it does seem to work. Can
anyone suggest how I can make the cell smaller?
Thanks
Do not use the width attribute at all for a <td>. The cell will shrink to
the size of the "X". But if your two digit numbers for the weeks are in
that same table, then you won't have just one character per cell.
IE does something weird, though. Your closing TD tag must be on the same
line as the opening TD tag. If it is moved down a line or so, it makes the
height larger than what you want. Not always, though. It's a quirk of IE, I
believe. I've read about it several times on developer's websites.
Also, a cell containing a transparent .gif can make it shrink even more.
I've had TD colspans set to null in which I couldn't get them to shrink
below what appeared to be 10 pixels in height. But after placing a
transparent gif set to the height I wanted, say 5-7 pixels, in the cell, the
colspan shrunk in height.
When you set your table border to "1", is the border close to your "X" on
all sides? It should be. I assume you have cellpadding & cellspacing set to
zero.
Carla