Changes

Jump to: navigation, search

CSS GUIDE TEXT-JUSTIFY

3,357 bytes added, 14:48, 13 December 2006
no edit summary
<span style="margin:0;background:#ffff33;font-size:120%;font-weight:bold;border:1px solid #a3b0bf;text-align:left;color:#000;padding:0.2em 0.4em;">This document is a work in progress and is subject to change.</span><br /><br />
== Summary ==

The text-justify property selects the justification algorithm used when [[CSS_GUIDE_TEXT-ALIGN|text-align]] property is set to justify.

<table border="0">
<tr>
<td><b>Applicability:</b></td><td>The text-justify property affects block-level and inline-block elements<td>
</tr>
<tr>
<td><b>[http://www.w3.org/TR/CSS21/media.html#visual-media-groups Media Group:]</b>
</td><td>Visual</td>
</tr>
<tr>
<td><b>Inherited:</b></td><td>Yes</td>
</tr>
</table>

== Syntax ==
<pre>
TARGET_ELEMENT{ text-justify: auto|inter-word|inter-ideograph|distribute|newspaper|inter-cluster|kashida }
</pre>

== Legal Values ==

The legal values of the visiblity property are:
* '''auto''' - The UA determines the justification algorithm to follow.
* '''inter-word''' - Spreads the text evenly across the line by increasing the width of the space between words only. This is the simplest and fastest full justification behavior.
* '''newspaper''' - Both inter-word and inter-letter spacing can be expanded or reduced to spread the text across the whole line
* '''inter-ideograph''' - letter-spacing modification only occurs for the CJK group
* '''distribute''' - It allows letter spacing modification for most script groups (except the Devanagari group), but unlike newspaper, it does not prioritize between word spacing and letter spacing.
* '''inter-cluster''' - Letter spacing only occurs between script-defined grapheme clusters occurring in Southeast Asian scripts. This is the Southeast Asian counterpart to 'inter-ideograph'.
* '''kashida''' - Letter spacing may be increased between Arabic letters with the extra space being filled by kashida. The amount of kashida is controlled by the [[CSS_GUIDE_TEXT_KASHIDA_SPACE|text-kashida-space]] property. If [[CSS_GUIDE_TEXT_KASHIDA_SPACE|text-kashida-space]] is set to the initial value, there will be no kashida effect. This is the Arabic counterpart to 'inter-ideograph'.

== Mozilla Recommended Values ==

== Usage Examples==

/* Set the text-justify property to inter-word */
div { text-justify: inter-word; }

/* Set the text-justify property to inter-word */
div { text-justify: newspaper; }

/* Set the text-justify property to inter-word */
div { text-justify: inter-ideograph; }

/* Set the text-justify property to inter-word */
div { text-justify: kashida; }

/* Set the text-justify property to inter-word */
div { text-justify: newspaper; }


== Notes ==

Here is a list of writing systems:
* CJK and Hangul and by extension all 'wide' characters
* Devanagari and all South Asian scripts using baseline connector (such as Bengali and Gurmukhi)
* South Eastern Asian scripts that do not use space between words (such as Thai, Lao, Khmer, Myanmar)
* Cursive scripts like Arabic
* Scripts using space between word without connector (such as Latin, Greek, Cyrillic, Hebrew, etc...) and symbol characters


== Specification Conformance ==
* [http://www.w3.org/TR/2003/CR-css3-text-20030514/#justification-prop CSS 3]

== Browser Compatibility ==

== See Also ==
* [[CSS_GUIDE_TEXT-ALIGN|text-align]]
* [[CSS_GUIDE_TEXT_KASHIDA_SPACE|text-kashida-space property]]
1
edit

Navigation menu