In HTML table, different words can be wrapped, but a long word will not be broken down. This will cause the cell width more than the width defined in CSS.
We can use CSS
word-wrap: break-word;to break down a word and keep the cell width fixed.
Example code:
<style type="text/css">
table td
{
word-wrap: break-word;
}
</style>
<table style="width: 100%; table-layout: fixed;" cellpadding="0" cellspacing="0">
<col width="13%" />
<col width="18%" />
<col width="30%" />
<col width="21%" />
<col width="18%" />
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
< <td>
</td>
</tr>
</table>
No comments:
Post a Comment