Table problems

G

Guest

I have a requirement to set up a webpage for the companies intranet. Since
the site always provides lots of good advice and information, I reviewed the
many postings pertaining to tables. I set up my webpage with a table of 740
pixels. The 740 pixels is divided into 5 columns giving me left and right
sidebars with a center wide column separated by gutter columns. I
highlighted each of the columns and set the pixels for each of the columns
because I wanted to keep them from moving.

Now the problem... as I began to proliferate the cells with copy and
graphics, the column widths began to shift. I have tried playing with the
graphics and text (smaller), as well as adjusting the 'padding' (?). If I
insert something into one of the columns that is beyond its scope, one of the
other columns shifts left or right and I have to keep playing with the width.
Columns also won't go back to original size and if I resize the column thru
the menu, the text or graphics in the column get pushed to the left as if
there were a right indent..... help! What is going on? One of the postings
indicated that text had presidence over width, but when that is changed, the
column does not return to its 'set dimenisons'..... Lenny
 
M

Mark Fitzpatrick

Have you tried spacer images? Create an gif image that is 1 pixel by 1 pixel
and transparent. Then put it into each of the cells and set the height to 1
pixel, and the width to whatever you need it. The problem with widths is,
they are really defined as "recommended", not absolute values. The
transparent spacer image is an old trick.

Don't forget though, if you play with cellpadding and cellspacing you have
to calculate those into the widths for the columns. If you have a padding of
2, you have to take that into account for each cell so a cell that is 100
wide is really 104 (2 pixels on each side for the padding).
 
R

Ronx

A table cell will always change its size to accomadate whatever is
placed in it.
If a cell is set to 100px wide, and an image 150px wide is placed in it,
that cell will expand to 150px width, and other cells in the row will
contract as much as possible to absorb that extra 50px regardless of
what size they have been set to. If they can't contract enough then the
table itself will expand. These cell width changes will affect every
cell in the same columns.

Mark's suggestion to use spacer cells will fix a minimum width for each
cell/column, but will not fix the maximum width.

Changing cell widths by dragging the cell borders will change the size
of every cell in the table.

One way to combat the problem is to not fix the size of the cells at
all. Fix the gutter cell widths, but allow the others to adopt whatever
widths they want. When the table is fully populated, then is the time
to make any adjustments - you may find you don't need any.

I find that cellpadding looks better than empty gutter columns - but
your mileage may vary...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

tables for newbie 1
Picture with table with columns 2
iframes and tables 5
Inserting a table into a document 1
Table column resize problem 2
tables & cells annoyance... 2
Tables - Inner 3
Table problems 1

Top