user3607282 user3607282 - 2 months ago 6x
HTML Question

Break word not working for single long words

In a table where a width size 97% is given, and a long single word like,

<td style="word-wrap: break-word;">

is added to a table cell where word wrap is set to break-word won't break the word. It goes past the set 97% width of the table.

Here is the JSFiddle of the problem, where two tables are created with the same styles but one table with a cell that has a single long word and the other with a paragraph with spaces.

Does anybody know how to solve this?

EDIT - Note that a FIXED WIDTH cannot be given to the tabled cell.


Try this instead:

.table-cell {