I think I got all combinations of word-break and overflow-wrap in this jsfiddle.
https://jsfiddle.net/thcurgsw/1/
I have timestamps in the format YYYYMMDD:HHMMSS
and want the CSS to break them at the colon. But neither in FireFox nor in Chrome do they break as one would expect them to do: they break in the middle of the number, but not at the colon. Do I miss another CSS-setting here or is this a browser bug?
PS: I also tried combinations of line-break to no avail.
The expected behaviour is whitespace > interpunctuation > hyphens > anything else
2
Answers
You should only add
width: fit-content;
attribute todiv
. And take the code in to the<div>
which section you want to wrap second line. You can check it from below snippet.