View Full Version : Pb with "width" of Table and "*"

12-25-2002, 04:13 PM

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%">
<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

Mr J
12-25-2002, 07:13 PM
Try giving the cells that contain text a fixed width.

12-25-2002, 09:13 PM
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 ???


12-25-2002, 09:40 PM
Any other idea ???


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

12-25-2002, 11:02 PM
Sorry but my table is already set with a 100% ....

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

Any ;) working idea ?

12-25-2002, 11:09 PM
This is a working idea:

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

Mr J
12-26-2002, 01:07 PM
<table cellspacing="0" cellpadding="0" border="1" width="100%">
<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>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum