Is it possible to specify characters on which a long string, such as a URL, should break in browsers?
For instance:
https://www.this-is-my-url.org/upload_dir/2015/01/foo_bar_faq.pdf
If the box only allows 40 characters per line, it might break like this:
| <- this is 40 chars mark
https://www.this-is-my-
url.org/upload_dir/2015/01/foo_bar_faq.pdf
The last line could even overflow because there is no “breakable char.” I am seeking a CSS property that accomplishes this, like:
p.url {
word-break-chars: "_/.";
}
This way, the URL could break on underscores, slashes, or periods and look more like:
|
https://www.this-is-my-url.org/upload_
dir/2015/01/foo_bar_faq.pdf
Using word-break: break-all;
is not an option for me because it looks really bad:
|
https://www.this-is-my-url.org/upload_di
r/2015/01/foo_bar_faq.pdf