CSS forces TD not to wrap
Author:Eve Cole
Update Time:2009-06-12 17:46:14
1. Add style="table-layout:fixed" to <table>;
2. Add style="width:100px;text-overflow:ellipsis; word-break:keep-all; overflow:hidden;" to <td>
When js generates a TABLE cell, it seems that the above method is not easy to use when there are too many words in the cell. You can do this directly:
cell.innerHTML="<nobar>"+"text"+"</nobar>";
Force no line breaks.