spacer

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

home / programming / corecss / 2 current pageTo page 2To page 3To page 4
[next]

Senior Systems Engineer – Disk-Based Backup/Replication (PA)
Next Step Systems
US-PA-Philadelphia

Justtechjobs.com Post A Job | Post A Resume
Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans


Core CSS: Chapter 11: Text Properties: Extensions

This excerpt is taken from the book: Core CSS, 2nd Edition by Prentice Hall.

TEXT-KASHIDA-SPACE PROPERTY

Arabic text is typically justified upon a line by expanding individual characters at certain, pre-determined points. This type of justification on Arabic text is called kashida. The text-kashida-space property gives you fine control over this type of justification, setting the ratio of kashida to whiter-space expansion.

The text-kashida-space property has two values: a percentage value and inherit. The inherit value takes on whatever parent value may already be set.

The effects of text-kashida-space are subtle but definite. The effect is not so much to justify the line of characters across a line, but instead to stretch the very characters themselves in order to fill in a line. It is meant to be used in conjunction with text-align: justify and text-justify: kashida, and Listing 11-10 shows how they all work together to produce an effect.

Listing 11-10 text-kashida-space Sample Code

<html dir="rtl" lang="ar">
<head>
<title>text-kashida-space Example</title>
<meta http-equiv="Content-Type" content="text/html; char-set=windows-1256">
<style>
p.koran {font-size: 25pt; width: 550px; font-family: "Traditional Arabic"; font-weight: bold; text-align: justify; text-justify: kashida}
</style>
</head>
<body>
:The following are the first few lines of the Koran
<p class="koran" style="text-kashida-space: 0%">
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِِ
الْحَمْدُ للّهِ رَبِّ الْعَالَمِينَ  
الرَّحْمـنِ الرَّحِيمِ  
مَالِكِ يَوْمِ الدِّينِ  
إِيَّاكَ نَعْبُدُ وإِيَّاكَ نَسْتَعِينُ  
اهدِنَـا الصِّرَاطَ المُستَقِيمَ  
صِرَاطَ الَّذِينَ أَنعَمتَ
عَلَيهِمْ غَيرِ المَغضُوبِ عَلَيهِمْ وَلاَ
الضَّالِّينَ  
</p>
:The same text, but now with a setting of <code>text-kashida-space: 10%</code>
<p class="koran" style="text-kashida-space: 10%">
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِِ
الْحَمْدُ للّهِ رَبِّ الْعَالَمِينَ  
الرَّحْمـنِ الرَّحِيمِ  
مَالِكِ يَوْمِ الدِّينِ  
إِيَّاكَ نَعْبُدُ وإِيَّاكَ نَسْتَعِينُ  
اهدِنَـا الصِّرَاطَ المُستَقِيمَ  
صِرَاطَ الَّذِينَ أَنعَمتَ
عَلَيهِمْ غَيرِ المَغضُوبِ عَلَيهِمْ وَلاَ
الضَّالِّينَ  
</p>
</body>
</html>

Figure 11-11: Sample Arabic text displayed using different text-kashida-space values.

Figure 11-11 shows the difference between Arabic text that uses the default value, and with a text-kashida-space value set to 10%. While the effect can be seen throughout the whole of second paragraph of text, in this case the effect is perhaps most clearly seen on the first line: the individual words are expanded and the space between them decreased.

CSS3 and text-kashida-position

This is another case of Microsoft being very successful in pitching its ideas for CSS properties to the World Wide Web Consortium -- the equivalent text-kashida-position property in the CSS3 text module works in exactly the same way as it currently functions within Internet Explorer.

home / programming / corecss / 2 current pageTo page 2To page 3To page 4
[next]


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger

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

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