...

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



freddybee
12-25-2002, 05:13 PM
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
:thumbsup:

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

freddybee
12-25-2002, 10: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 ???

:)

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

yeah

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

freddybee
12-26-2002, 12:02 AM
Sorry but my table is already set with a 100% ....

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

Any ;) working idea ?

MCookie
12-26-2002, 12:09 AM
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>

Mr J
12-26-2002, 02:07 PM
<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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum