posted 22 years ago
Hello,
I have a HTML table, the content of the cells are retrieved from database table. I specified the width of each cell (TD) in my HTML table, but when the cells are filled with content from database, the width of the HTML cells changed in my browser (IE6.0).
The following is an example of my table:
<table width="779">
<tr>
<td width="152">
<!--some code -->
</td>
<td width="621">
<table width="100%">
<tr width="100%">
<!--some code -->
</tr>
<tr width="100%">
<td width="100%">
<table width ="100">
<tr>
<td width="10"> col1</td>
<td width="100"> col2</td>
<td width="74"> col3</td>
<td width="100"> col4</td>
<td width="97">col5 </td>
<%if(condition){%> <td width="159">col6 </td> <%}%>
</tr>
<tr>
<td>value1</td>
<td>value2</td>
<td>value3</td>
<td>value4</td>
<td>value5 </td>
<%if(condition) {%> <td >value6 </td> <%}%>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
The value1 to value6 are retrieved from database. whether col6 and value6 will be displayed or not is conditional.
My problem is that the width of each cell changed based on the length of vaule1 to value6.
Can someone tell me how to make the length of each cell fixed?