You are here: Re: custom WORD-BREAK « HTML « IT news, forums, messages
Re: custom WORD-BREAK

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация