XML technologies / CSS / Advanced websites with CSS / CSS property reference / text-justify
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property text-justify, which is not part of the CSS specification, describes word spacing in a block element whose property text-align is set to justify. This property is intended for East Asian and Arabic languages. In these languages, changing word spacing, which is normally adjusted automatically for justified text, changes the meaning; CSS can therefore control it.
Inherited: yes
See also: text-align, text-kashida-space
Values
The property text-justify accepts the following constants:
auto: Word spacing is calculated automatically by the browser.distribute: Word and character spacing is increased.distribute-all-lines: Likedistribute, also affecting the last line.inter-cluster: Likedistribute, without spaces between Southeast Asian character groups.inter-ideograph: Likedistribute, but without spaces between Latin letters.inter-word: Increases only word spacing in languages using Latin script.kashida: Increases spacing by extending strokes in Arabic scripts.newspaper: Likedistribute, giving additional word spacing priority over additional character spacing.
Default value: auto
Compatibility
CSS version: is not part of the CSS specification
Works only in Internet Explorer for Windows 5 and later (kashida only from version 5.5).
Corresponding functionality is planned for CSS3. However, the final property and value names will probably be different. Current information is available on the CSS Working Group website.
Example
The following style rule sets justified text in elements div of the class spaltentext to use the method newspaper:
div.spaltentext {
text-align: justify;
text-justify: newspaper;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg