General description:
How to create a table where some cells have invariable dimensions (height and width) and other cells can change their dimensions depending on the content of the table.
Actual problem:
I have a 3x3 table. In the first collumn two of the three cells are merged (the two lowest). In this area (merged cells) I write some text that can change (sometimes is longer sometime shorter). The problem appears in the other two collumns: i want the top and the bottom cells to mantain their dimensions and the middle one to be able to change its dimnesion depending on the lenght of the text. But... obviously the one who change its height is the middle one. Even though for all the other cells I specified the height and for the middle cell I didn't. I also tried with 100% in the middle-cell height but still is the bottom-cell that changes height. Do you have any idea?
Here is the code of the table:
Thanks for suggestions
How to create a table where some cells have invariable dimensions (height and width) and other cells can change their dimensions depending on the content of the table.
Actual problem:
I have a 3x3 table. In the first collumn two of the three cells are merged (the two lowest). In this area (merged cells) I write some text that can change (sometimes is longer sometime shorter). The problem appears in the other two collumns: i want the top and the bottom cells to mantain their dimensions and the middle one to be able to change its dimnesion depending on the lenght of the text. But... obviously the one who change its height is the middle one. Even though for all the other cells I specified the height and for the middle cell I didn't. I also tried with 100% in the middle-cell height but still is the bottom-cell that changes height. Do you have any idea?
Here is the code of the table:
Code:
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width=400 height=25 bgcolor="#CCCCCC"></td>
<td width=30 height="25"></td>
<td width=300 height="25" bgcolor="#CCCCCC">the height of this cell shouldn't change</td>
</tr>
<tr>
<td rowspan="2" bgcolor="#999999" width="400">
<p>here</p>
<p>goes</p>
<p> </p>
<p> </p>
<p>the</p>
<p> </p>
<p> </p>
<p>text</p>
</td>
<td width="30"></td>
<td width="300" bgcolor="#FF0000" height="100%">This cell should adapt</td>
</tr>
<tr>
<td width="30" height="25"></td>
<td width="300" height="25" bgcolor="#CCCCCC">the height of this cell shouldn't change</td>
</tr>
</table>
Thanks for suggestions