Soft-wrapping long words
The issue of long, non-breaking words like urls has been around for a while on the web - and the impact this can have on layouts and other places where width is constrained for whatever reason. I've been going back and forth on this, and dug up and old test page on No-wrapping and Soft-wrapping. This has some test cases using <nobr>, <wbr> and the soft-hyphen character ­. The results aren't too pretty:
- Mozilla/Firefox:
- Ignores ­,
supports <wbr>, but not when contained in <nobr> - Windows IE 6:
- Wraps correctly with ­,
displays '-' only at a wrap-point.
Supports <wbr> solo, and when contained in <nobr> - Safari 2.0:
- Wraps correctly with ­,
displays '-' only at a wrap-point.
Seems to only pay attention to <wbr> in the context of <nobr>, where there are spaces to wrap on. - Opera 9.0:
- Wraps correctly with ­
Ignores <wbr> completely, supports <nobr>
1 Comments:
Hi Sam,
"wbr" tag saved my sanity, I had a text with no spaces, just commas that was driving me nuts, thanks for writing the post.
Dan
<< Home