debaShish debaShish - 1 month ago 19
HTML Question

HTML Table issue in IE

I have a nested table structure like this below

<table width="100%">
<tr>
<td>
<table id="tableform" cellspacing=5 cellpadding=2 class="form">
.........
<tr>
<td valign="top">
Select Columns For Report :
</td>
</tr>
</table>
</td>
</tr>
</table>


Inside the table tableform I have created one html form.

That form has one field label Select Columns For Report : which is the longest label and it is getting wrapped over multiple lines in IE, which I don't want, whereas in firefox and chrome it is working properly.

Do you have any workaround for this problem in IE? If tomorrow, another longer label comes up, then what is there to be done?

Answer

Add a class to the td and add white-space: nowrap:

<td valign="top" class="nowrap">
    Select Columns For Report :
</td>

.nowrap {
    white-space: nowrap
}