I have a table where the last column contains a very long string without spaces.
How can I display that column with a "reasonable" (maybe fixed) width, forcing the long string to be split on multiple lines if needed?

1 answer

1
point

You could insert the soft hyphen ­ every n characters in your string; major browsers should support it now and wrap the line if needed, and if not the hyphens are not shawn.

You may want to look at these previous questions in SO for more insight as well: Soft hyphen in HTML (<wbr> vs. &shy;) and In HTML, how to word-break on a dash?.

Answered almost 7 years ago by Edoardo Galvagno