Not sure if I'm wording this right.
Right now I'm using the following CSS to hyphenate long words on my web page, which works pretty well:
overflow-wrap: break-word;
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
What I would like, however, is to have a fallback that attempts to push the whole word (and subsequent words) to the next line if the next word can fit the line, as opposed to breaking/hyphenating any word near the edge of my container, regardless of length.
Basically, here's what's going on:
-----------------------
The quick br-
own fox jumps ov-
er the lazy dog
Somereallyrdic-
oulosly long word
-----------------------
What I would like is:
-----------------------
The quick
brown fox jumps
over the lazy
dog
Somereallyrdic-
oulosly long word
-----------------------
Is this possible with CSS?