spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / corecss / 1 To page 1To page 2To page 3To page 4To page 5current pageTo page 7
[previous] [next]

Core CSS: Chapter 11: Text Properties: Extensions

Senior Lotus Notes Developer
AMS Staffing Solutions
US-MD-Baltimore

Justtechjobs.com Post A Job | Post A Resume
Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management

TEXT-AUTOSPACE PROPERTY

If you have done much work on creating Web pages destined for an Asian-language audience, you know that there are many occasions when you need to mix in Western-style text with your Asian text. The text-autospace property is designed to let you have more control over the spacing between Western characters and your Asian-based character text. In this way, you can help offset, and perhaps emphasize, the Western characters and words that appear in your Asian text.

The text-autospace property has five properties: none, ideograph-alpha, ideograph-numeric, ideograph-parenthesis, ideograph-space. The none value is the default, setting no special spacing value between any Asian and Western characters that may appear together on a Web page. The rest of the properties for text-autospace describe the conditions under which slightly more space is added when it is next to an Asian ideographic character. So ideograph-alpha adds extra space when any regular Western, "alphabetical" characters appear next to Asian ideographs. Similarly, extra space is added between Asian characters and numerals when ideograph-numeric is used, ideograph-parenthesis is intended to add extra space between Asian characters and information contains in brackets, and when an Asian character is next to a space, ideograph-space is intended to make it a slightly larger space.

The effects of these values can be subtle, but the end results are intended to space out the different types of characters from each other in an attempt to make things more readable. Listing 11-8 shows the effects of three of these values set to some nonsensical Chinese text mixed together with English words and numbers.

Listing 11-8 text-autospace Sample Code
<html>
<head>
<title>text-autospace Example</title>
</head>
<style>
span {font-family: ËÎÌå,MingLiU; font-weight: bold; font-size: 20pt; layout-flow: vertical-ideographic; height: 400px}
</style>
<body>
<span>text-autospace: none</span>
<span style="text-autospace: none">
&#27489;1&#36814;2&#28459;3&#28216;4
(PanelX) &#150;5
&#24179;6&#38754;7&#39023;8&#31034;9&#23631;10&#26989;11&#30028;12&#30340;
Portal 13&#21450; Exchange 14
</span>
<span>&nbsp;</span>
<span>text-autospace: ideograph-alpha</span>
<span style="text-autospace: ideograph-alpha">
&#27489;1&#36814;2&#28459;3&#28216;4
(PanelX) &#150;5
&#24179;6&#38754;7&#39023;8&#31034;9&#23631;10&#26989;11&#30028;12&#30340;
Portal 13&#21450; Exchange 14
</span>
<span>&nbsp;</span>
<span>text-autospace: ideograph-numeric</span>
<span style="text-autospace: ideograph-numeric">
&#27489;1&#36814;2&#28459;3&#28216;4
(PanelX) &#150;5
&#24179;6&#38754;7&#39023;8&#31034;9&#23631;10&#26989;11&#30028;12&#30340;
Portal 13&#21450; Exchange 14
</span>
</body>
</html>

Figure 11-9: Internet Explorer depicting the effects of the none, ideograph-alpha and ideograph-numeric values for text-autospace against a mix of Chinese characters, Western text and numbers.

The effects of these three different values of text-autospace can be seen in Figure 11-9. The initial none value, seen in the right of Figure 11-9 -- which is what you would get as a default -- treats the English text, numbers and Chinese text equally, giving them the same amount of spacing. The result is a muddied jumble of all of these characters. The next sample text uses the ideograph-alpha value, and though the effect is subtle, there is slight additional spacing added between the English words and their surrounding Chinese characters. The results are more noticeable with the ideograph-numeric value, which clearly adds additional space between each individual number and the Chinese characters that surround them. The end effect is to make each block of text more readable.

There is no way to adjust the spacing settings for these text-autospace values -- you get what you get, which is predetermined by the browser's own settings for handling Asian character sets.

CSS3 and text-autospace

There is an equivalent text-autospace property under the CSS3 text module. It has all of the same values as does the Internet Explorer equivalent, and they are designed to work in the same way.

home / programming / corecss / 1 To page 1To page 2To page 3To page 4To page 5current pageTo page 7
[previous] [next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags

Created: March 27, 2003
Revised: August 19, 2003

URL: http://webreference.com/programming/corecss/1