www.webdeveloper.com
Results 1 to 4 of 4

Thread: Table problem?

  1. #1
    Join Date
    Oct 2006
    Posts
    148

    Cool Table problem?

    I'm "trying" to style a dreaded table so that the first td is about 20% of the table, the second td is 50% and the 3rd is 20%... for some reason its not working PLUS no obeying the normal % of the parent table?
    Any suggestions? I tried "width=20%" as well as css way.
    Thanks a mill
    PS Plz don't tell me to validate my html - this is a test example!

    http://homepage.eircom.net/~egoman/tested.html


    <html>
    <body>
    <center>
    <table width="90%" bgcolor="blue">

    <tr>
    <td width="100%">

    <table style="float: left; width: 20%;">
    <tr>
    <td bgcolor="red" valign="top"> THIS IS THE LEFT COLUMN, THIS IS THE LEFT COLUMN ETC ETC ETC
    </td>

    </tr>
    </table>

    <table style="float: left; width: 50%;">
    <tr>
    <td bgcolor="red" valign="top"> middle</td>

    </tr>
    </table>

    <table style="float: left;width:20%;">
    <tr>
    <td bgcolor="red" valign="top"> right</td>

    </tr>
    </table>


    <tr>
    <td>

    </table>
    Last edited by le007; 11-09-2006 at 07:53 PM.

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Looks like the inner ones should just be TDs, not full tables. Of course there probably shouldn't be any tables at all but saying that would be like saying to validate it.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    Your very nasty table layout does in fact work and, if you put in the
    'THIS IS THE LEFT COLUMN, THIS IS THE LEFT COLUMN ETC ETC ETC',
    the widths will be approximately correct. On your linked sample page, however, there is no whitespace in the text, so it is pushing out the width of the first table.

  4. #4
    Join Date
    Nov 2005
    Location
    Central Jersey
    Posts
    48
    20% of the table, the second td is 50% and the 3rd is 20%.
    Thats only 90%

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