Comment 3 for bug 929

Revision history for this message
James Henstridge (jamesh) wrote :

I posted some options for how to break words on one of the duplicate bugs. Since they are useful, I'll repeat them here:

1. use the non-standard <wbr> tag (word break). This is supported by all major web browsers (apparently includes Opera if used with some special CSS). Has the side effect that double click select won't select the entire word if it contains a word break.

2. use the zero width space character (&#8203;). Apparently causes some display issues in IE.

3. use the soft hyphen character (&shy; or &#173;). This character is supposed to only display when at the end of a line, and act as a word break. Unfortunately, it isn't properly supported by Mozilla (doesn't break words).
  http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.3
  https://bugzilla.mozilla.org/show_bug.cgi?id=9101

4. use actual space characters. Works with every browser, but looks ugly and can change the meaning of the text.

A rundown of the compatibility for the various word breaking methods can be found here:
  http://www.quirksmode.org/oddsandends/wbr.html

In both cases, we'd need to make some decisions about where to place such breaks. How long can a word get before we break it? Do we just break words at a particular number of characters, or try to inteligently hyphenate the text?