| home / programming / corecss / 1 | [previous] |
|
|
text-justify property provides
much greater control over the type of justification use.
The text-justify property has a total of eight separate values:
auto, distribute, distribute-all-lines,
inter-cluster, inter-ideograph, inter-word,
kashida and newspaper. The auto value
is the default, allowing the browser to determine how to best justify a line
of text. The distribute value is intended for use with Asian character
sets, and justifies every line of text in a vertical paragraph save for the
last line. The distribute-all-lines value is also intended for
Asian character sets, and works the same way as distribute, but it applies the
justification to all lines of text in a block of text, including the final line.
Both inter-cluster and inter-ideograph are similarly
intended for Asian character sets, the first justifies lines of text containing
no inter-word spacing, the second increasing or decreasing the width between
characters or words as necessary. The inter-word value increases
or decreases the spacing between individual words, though this is applied to
the final line of text in the paragraph. The kashida value is specific
to Arabic characters, and it justifies the text by exaggerating certain characters
at specific points. Finally, the newspaper value increases or decreases
the spaces between words, and works the same way as distribute -- which similarly
does not justify the final line of text -- but it is intended for Western text.
This property is meant to be used in conjunction with the text-align
property set to justify.
Listing 11-9 shows some simple English text on a page using the default auto
value as well as the distribute-all-lines values for text-justify.
Listing 11-9 text-justify Sample Code
<html>
<head>
<title>text-justify Example</title>
<style>
body {font-size: 20pt}
p {text-align:justify; width: 550px; font-weight: bold}
</style>
</head>
<body>
text-justify: auto (the default)
<p style="text-justify: auto">
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
</p>
text-justify: distribute-all-lines
<p style="text-justify: distribute-all-lines">
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
The quick fox jumped over the lazy dog.
</p>
</body>
</html>

text-justify property
displayed.
The effects of the text-justify values can be seen in Figure
11-10. The first paragraph really just displays the effects of text-align:
justify which is set to both paragraphs on the page, but the second shows
the distinct effect of distribute-all-lines value for text-justify,
which justifies each and every line of text by increasing the space between
individual letter and words in the final line of the paragraph.
text-justify The CSS3 text module introduces a new property called text-script
which copies many of the effects value names for text-justify.
The text-justify property shares the values auto,
distribute, inter-cluster, inter-ideograph,
inter-word, kashida and newspaper (as
well as the ubiquitous CSS3 values initial and inherit)
but dispenses with distribute-all-lines. Given that Microsoft,
who make Internet Explorer is a member of the World Wide Web Consortium, they
are likely to implement these values as the text-script property.
For more information on this property, see the section devoted to this property
in Chapter 10, "Text Properties"
| home / programming / corecss / 1 | [previous] |
Created: March 11, 2003
Revised: August 19, 2003
URL: http://webreference.com/programming/corecss/1