As titled.
Possible similar to Using "word-wrap: break-word" within a table but the answers did not resolve my problem.
Example:
| --<td style="width:100px">(example)-- |
| |
| Example 1: |
| something long something something something | <- this line should break into below:
| |
| something long something something |
| something | <- when break at word is possible
| |
| |
| Example 2: |
| somethinglongsomethingsomethingsomethingsomething | <- this line should break into below:
| |
| somethinglongsomethingsomethingsometh |
| ingsomething | <- when break at word is not possible
It seems like I can either use break-word
or break-all
.
For break-word
, example 1 works but example 2 stretches the table, regardless if I set table-layout: fixed
in the table or not.
For break-all
, example 2 works but example 1 also breaks the word.
Is there any clever way to let the table break the word only when it have to?