Reputation: 35
I have a HTML content like
<Table style="width=100px;">
<tr>
<td>
KEY1:Value1 Key2:Value2
</td>
<tr>
<Table>
Now if my td content is longer than the TD width, it should show like
Key1: value1
Key2: value2
Note: this should be applicable only if the content length is higher than the TD width Also, this is needed for IE6
Upvotes: 0
Views: 213
Reputation: 1610
Set table-layout:fixed for table and word-wrap:break-word in the td.
table{
width:100px;
table-layout:fixed;
}
td{
word-wrap:break-word ;
}
Working fiddle here
Upvotes: 1