Hi there,
I’m working on generating html code for a data grid ... the idea is to allow the code be "small"…problem that I'm having is how to set "a fixed column width", regardless of the data in the column.
1)In the first attempt, I generated the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td style="WIDTH:60;"> Data Data DataDatatadadsdsds</td>
<td style="WIDTH:60">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</td>
</TR>
</TABLE>
But the columns width where dependent on cell contents !
2) On the second attempt, I got the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td style="WIDTH:60;OVERFLOW:hidden;"> Data Data DataDatatadadsdsds</td>
<td style="WIDTH:60;OVERFLOW:hidden;">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</td>
</TR>
</TABLE>
But the columns width where still dependent on cell contents !
3) My Third attempt generated the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td><span style="WIDTH:60;OVERFLOW:hidden;"> Data Data DataDatatadadsdsds</span></td>
<td><span style="WIDTH:60;OVERFLOW:hidden;">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</span></td>
</TR>
</TABLE>
In this one I got the desired result ... Bottom line is that I would like to achieve the fixed width without using spans or divs ... the ideal thing would be to define it on the td level and use a css class to “enforce it”
Any suggestions would be welcome !
Thanks for your help !!!!!
TrekFan
I’m working on generating html code for a data grid ... the idea is to allow the code be "small"…problem that I'm having is how to set "a fixed column width", regardless of the data in the column.
1)In the first attempt, I generated the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td style="WIDTH:60;"> Data Data DataDatatadadsdsds</td>
<td style="WIDTH:60">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</td>
</TR>
</TABLE>
But the columns width where dependent on cell contents !
2) On the second attempt, I got the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td style="WIDTH:60;OVERFLOW:hidden;"> Data Data DataDatatadadsdsds</td>
<td style="WIDTH:60;OVERFLOW:hidden;">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</td>
</TR>
</TABLE>
But the columns width where still dependent on cell contents !
3) My Third attempt generated the following code:
<TABLE id=Testbody cellSpacing=0 width=120 border=1>
<TR>
<td><span style="WIDTH:60;OVERFLOW:hidden;"> Data Data DataDatatadadsdsds</span></td>
<td><span style="WIDTH:60;OVERFLOW:hidden;">MoreDataMoreData MoreDataMoreDataMoreDataMoreData</span></td>
</TR>
</TABLE>
In this one I got the desired result ... Bottom line is that I would like to achieve the fixed width without using spans or divs ... the ideal thing would be to define it on the td level and use a css class to “enforce it”
Any suggestions would be welcome !
Thanks for your help !!!!!
TrekFan