Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Pb with "width" of Table and "*"

    Hi,

    I do have a table with n+1 cells (TD).
    Each of the first n cells have a content (text), the last one is empty.
    My table has a width of 100%.
    I want each of the first n cell to be wide enough to show the texte and the last one to fullfill the rest of the space ...
    <-------------------------- width of the sreen ----------------------------->
    (Text1 I Another Text I One more text I I

    I have
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td>Text1</td>
    <td>Another Text</td>
    <td>One more Text</td>
    <td width="*"></td>

    But the result is that all cell are wider than supposed (there are not restrict to the width of the text).

    Any idea ???

    Thanks and merry xmas
    [color=dark blue]Freddy Bee[/color]

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try giving the cells that contain text a fixed width.

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Of course that is a solution ....

    .... but I do not know in advance the content (it is dynamic) so I can't fix the size of the cell !!!!

    Any other idea ???

    [color=dark blue]Freddy Bee[/color]

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any other idea ???
    yeah

    in your case either use width="100%" or just leave out width...
    redhead

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry but my table is already set with a 100% ....

    If you mean the cells (TD) that doesn't work ..

    Any working idea ?
    [color=dark blue]Freddy Bee[/color]

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is a working idea:

    <table cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td>Text1</td>
    <td>Another Text</td>
    <td>One more Text</td>
    <td width="100%"></td>

  • #7
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts


    <table cellspacing="0" cellpadding="0" border="1" width="100%">
    <tr>
    <td width="100">Text1</td>
    <td width="200">Another Text</td>
    <td width="200">Adding a fixed with to a cell means that the text will wrap within that cell</td>
    <td>&ampnbsp;</td>
    </tr></table>


  •  

    Posting Permissions

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