W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Using white-space: no-wrap to prevent breaking between CJK words/names

From: Richard Ishida <ishida@w3.org>
Date: Mon, 31 Jan 2011 17:33:24 +0000
Message-ID: <4D46F264.20506@w3.org>
To: www-style@w3.org
CC: www International <www-international@w3.org>, public-i18n-cjk@w3.org
Ambrose Li was concerned to find a way to prevent line breaking between 
characters in certain Japanese and Chinese words, such as names and 
other compound words.

Boris Zbarsky suggested that the correct approach is to use markup 
around the words/names and apply white-space:no-wrap.

I also think that this is probably the right approach. It is similar to 
the approach used in SSML with the token or w element. 

Ambrose thought that no-wrap doesn't work in most browsers, so I put a 
quick test case together at 

I found that:
Firefox, Opera (Windows) and Camino work fine.
Chrome and Safari both wrap the character on either side of the marked 
up word as a single unit. I think this is a bug.
IE8 wraps the character following the marked up word (but not the one 
before like Chrome and Safari) as a single unit with the marked up word. 
  I think this is also a bug.
Opera on the Mac doesn't seem to support no-wrap at all, and just wraps 
one character at a time.

Richard Ishida
Internationalization Activity Lead
W3C (World Wide Web Consortium)

Received on Monday, 31 January 2011 17:36:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:42 UTC