Why doesn't the table data cell work properly

Discussion in 'HTML' started by John Salerno, Feb 2, 2006.

  1. John Salerno

    John Salerno Guest

    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
     
    John Salerno, Feb 2, 2006
    #1
    1. Advertising

  2. John Salerno <> 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
     
    Jukka K. Korpela, Feb 2, 2006
    #2
    1. Advertising

  3. John Salerno

    John Salerno Guest

    Jukka K. Korpela wrote:
    > John Salerno <> 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!) :)
     
    John Salerno, Feb 2, 2006
    #3
  4. John Salerno

    John Salerno Guest

    Jukka K. Korpela wrote:
    > John Salerno <> 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/function.SetLocalInt.html
     
    John Salerno, Feb 2, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Saunders
    Replies:
    2
    Views:
    2,265
    John Saunders
    Jun 4, 2004
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,090
    Smokey Grindel
    Dec 2, 2006
  3. Replies:
    6
    Views:
    321
    Old Wolf
    Mar 14, 2005
  4. Malcolm
    Replies:
    2
    Views:
    126
    Michael Winter
    Sep 3, 2004
  5. Pawel_Iks
    Replies:
    0
    Views:
    141
    Pawel_Iks
    Oct 17, 2008
Loading...

Share This Page