J
john
I want to set the cell width and height such that the cell doesn't get
bigger. If the text is too long for the cell, it should be clipped. It
only has to work for IE. I have tried setting the overflow style to
hidden, but that doesn't work unless I set the table-layout style of
the table to fixed, which I cannot do. In the sample code below, it
correctly sets the width of the cell to 200, but the height gets
bigger and it wraps the text. If I add a <nobr> tag to the cell, the
text doesn't wrap any more, but the width gets real big (enough to fit
all the text).
<table width="200" border="1">
<tr>
<td height="20" width="200" id="tableCell" style="overflow:hidden">
So, here is some text that obviously will not fit in this lousy 200
pixel wide box.
</td>
</tr>
</table>
Thanks in advance.
bigger. If the text is too long for the cell, it should be clipped. It
only has to work for IE. I have tried setting the overflow style to
hidden, but that doesn't work unless I set the table-layout style of
the table to fixed, which I cannot do. In the sample code below, it
correctly sets the width of the cell to 200, but the height gets
bigger and it wraps the text. If I add a <nobr> tag to the cell, the
text doesn't wrap any more, but the width gets real big (enough to fit
all the text).
<table width="200" border="1">
<tr>
<td height="20" width="200" id="tableCell" style="overflow:hidden">
So, here is some text that obviously will not fit in this lousy 200
pixel wide box.
</td>
</tr>
</table>
Thanks in advance.