dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: table-layout question

  1. #1
    Join Date
    Feb 2004
    Posts
    12

    table-layout question

    Simple question really, can I use table-layout: fixed when the first row of the table is going to have percentages instead of 'fixed' widths?

    Doing this;
    <table width="100%" ID="turkey" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFCCCC">
    <tr>
    <td width="10%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    <td width="10%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    <td width="10%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    <td width="10%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    <td width="10%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    <td width="50%"><img src="spacer.gif" height="10" width="1" alt=""></td>
    </tr>
    More rows and cells,
    dah, dee, dah, dee, dah....
    </table>
    With this;

    table#turkey {table-layout: fixed;}
    Produces a fine and dandy table in everything I care about but in NetScape 7 the table is rendered just an ickle bit short of the right-hand-side of the browser window, not quite the 100% it should be. Inspirational, Grrr!

  2. #2
    Join Date
    Jan 2004
    Location
    United Kingdom
    Posts
    610
    Tell me if i have the wrong end of the stick here.

    Have you defined the margin:0; and padding:0; for the body?

  3. #3
    Join Date
    Feb 2004
    Posts
    12
    Er? It's not you with the wrong end of the stick, it's me. Apparently. If I type
    tableLayout
    note the capitalization, it works.

    Well, it doesn't blow in Netscape 7 or the others. Whether or not it will allow IE to render the table (a large, ahem, super large, results table) rows as they appear (which is the goal)is another matter.

    And yes, margins were set to zero.

  4. #4
    Join Date
    Feb 2004
    Posts
    12
    Hold up, hold up. Maybe with it written tableLayout Netscape 7 is just choosing to ignore that property, because it doesn't understand it, and going on with the rest of the styles.

    Sheesh, thought I had it.

  5. #5
    Join Date
    Feb 2004
    Posts
    12
    Hmmm, continuing my solioquy. It would seem that Netscape is suffering some sort of maths rounding problem since if I play with the browser window, pull it out ooh so slightly, a little at a time, I'll hit a point where the table is fully 100% wide. Pull it just a gnat's whisker more and pop, the table is short by four or five pixels again and stays so until I hit another 100% accurate sweet spot.

    I guess the answer to my original question is, therefore, no, you can't use table-layout with fluid tables.

    Shame.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles