Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Why doesn't the table data cell work properly

Reply
Thread Tools

Why doesn't the table data cell work properly

 
 
John Salerno
Guest
Posts: n/a
 
      02-02-2006
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/func...era_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
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-02-2006
John Salerno <(E-Mail Removed)> wrote:

> 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.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
 
John Salerno
Guest
Posts: n/a
 
      02-02-2006
Jukka K. Korpela wrote:
> John Salerno <(E-Mail Removed)> wrote:
>
>> 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.
>


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!)
 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      02-02-2006
Jukka K. Korpela wrote:
> John Salerno <(E-Mail Removed)> wrote:
>
>> 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.
>


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/func...tLocalInt.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
how do i show/hide a div within a table cell properly? Susanne West HTML 4 11-15-2006 04:38 PM
How do I have a table cell fetch another page to display within the cell? Phillip Roncoroni HTML 14 04-05-2004 05:58 PM
More American Graffiti: Properly Framed, Properly Scored? Scot Gardner DVD Video 0 09-02-2003 02:28 AM



Advertisments