Why doesn't the table data cell work properly

J

John Salerno

Can someone take a look at this page and tell me why the second data
cell in this table (under the "See Also" section) is moved so far over
to the right? I thought a data cell was only as wide as its content,
before you style it.

Here's the link to the page:
http://www.johnjsal.com/gestalt/functions/g_stop_camera_moves.html

And here's the link to the style sheet:
http://www.johnjsal.com/gestalt/style/msdn.css

My guess is that there is something in the style sheet causing this, but
I just can't see what it is.

Thanks,
John
 
J

Jukka K. Korpela

John Salerno said:
Can someone take a look at this page and tell me why the second
data cell in this table (under the "See Also" section) is moved so
far over to the right? I thought a data cell was only as wide as
its content, before you style it.

It seems that the width of the table has been set (to 93%). A browser
has to make the columns wide enough to achieve the width. There are no
rules on how browsers should do this when no widths have been set for
the columns (cells), and browsers are known to do this differently.
Even if you set a width for a cell, it's still just "suggested minimum
width".

Perhaps the simplest way to deal with the issue is to remove the
width setting for the table.
 
J

John Salerno

Jukka said:
It seems that the width of the table has been set (to 93%). A browser
has to make the columns wide enough to achieve the width. There are no
rules on how browsers should do this when no widths have been set for
the columns (cells), and browsers are known to do this differently.
Even if you set a width for a cell, it's still just "suggested minimum
width".

Perhaps the simplest way to deal with the issue is to remove the
width setting for the table.

Thanks! I'm afraid to mess with any of the style rules that were already
there, but now that I know what's causing the problem, maybe I can just
override it.

Also, I started to wonder if I even need to use a table to do this. I
suppose it might help if I had more rows later, but the main reason was
to take advantage of the pre-existing table styles in the style sheet
(which obviously is not working!) :)
 
J

John Salerno

Jukka said:
It seems that the width of the table has been set (to 93%). A browser
has to make the columns wide enough to achieve the width. There are no
rules on how browsers should do this when no widths have been set for
the columns (cells), and browsers are known to do this differently.
Even if you set a width for a cell, it's still just "suggested minimum
width".

Perhaps the simplest way to deal with the issue is to remove the
width setting for the table.

Wait, I have a quick follow up. I understand that the width: 93% might
be causing this problem, but here is a page (which I did not create
myself) that uses the same style sheet, and the data cells are not
mis-aligned like mine. Why would it display properly on this page but
not mine?

http://www.johnjsal.com/gestalt/function.SetLocalInt.html
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top