|
Posted by Jukka K. Korpela on 04/10/07 11:12
Scripsit Ben:
> Does anyone know if there is a way of specifying a custom "WORD-BREAK"
> in css?
There is none. In fact, the word-break property isn't part of CSS at all; it
is just in a CSS 3 draft and partly implemented in IE.
> I can set it to normal, which breaks on spaces, or All, which
> breaks anywhere, but ideally I would like it to break on spaces or
> commas only...
You cannot do such things in CSS. As a practical move, you could simply add
<wbr> after each comma. (Stay tuned to mourning complaints about <wbr> being
nonstandard. It's not allowed to mention it without making a liturgic remark
about its not being in HTML specifications.)
> Is there a way, shoer of processing the strings to turn all commas
> into spaces beforehand?
If you turn commas into spaces, you change the content. What's really
relevant here? As usual, a URL etc.
The odds are that you should simply stop creating the problem (either by
removing artificial width restrictions or by doing something to long strings
with no whitespace), but it's difficult to help with that without seeing how
you are now creating it.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|