If a word (e.g.THIS_PHRASE_HERE
) overflows its inner div (fixed width), I want to split it with an underscore. I know I can useword-break:break-all
to split a word on any character, but that seems a bit confusing, especially if there are 1 or 2 character orphans at the end. I'm sure I can do this with JS, but was wondering if there's a way to do it just in CSS, likeword-break: "_"
.
Apparently there is no way to do this using just CSS, theword-breakproperty doesn't have that option.
You can use the html tag wbr> to add work break opportunities where the browser can choose to break a line.