FANDOM


The text-justify property is used in CSS and certain HTML elements. The justify value from the text-align property must be set for this property to have any effect. Text-justify offers a fine level of justification control over the enclosed content, allowing for a variety of sophisticated justification models used in different language writing systems.

Values

  • auto - The browser will determine the appropriate justification algorithm to use.
  • distribute - Justification is handled similarly to the newspaper value, but this version is optimized for East Asian content (especially the Thai language). In this justification method, the last line is not justified.
  • distribute-all-lines - Behavior and intent for this value is the same as with the distribute value, but the last line is also justified.
  • inter-cluster - Justifies content that does not have any inter-word spacing (such as with many East Asian languages).
  • inter-ideograph - Used for justifying blocks of ideographic content. Justification is achieved by increasing or decreasing spacing between ideographic characters and words as well.
  • inter-word - Justification is achieved by increasing the spacing between words. It is the quickest method of justification and does not justify the last line of a content block.
  • newspaper - Spacing between letters and words are increased or decreased as necessary. The IE reference says "it is the most sophisticated form of justification for Latin alphabets."


HTML example:

<div style="text-align:justify; text-justify:newspaper;">This is Newspaper justified text.</div>


CSS example:

div {
     text-align:justify;
     text-justify:newspaper;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.