CSS3 text-justify property
Example
Change the spacing between characters so that each line is justified:
div
{
text-align:
justify
;
text-justify:
inter-word
;
}
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| text-justify | Not supported | 5.5 | Not supported | Not supported | Not supported |
Property definition and usage
The text-justify property specifies the justification method used when text-align is set to "justify".
This property specifies how text should be justified and the justification spacing.
| Default value: | auto |
|---|---|
| Inherited: | yes |
| Version: | CSS3 |
| JavaScript syntax: | object.style.textJustify="inter-word" |
Syntax
text-justify: auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|trim;
| Value | Description |
|---|---|
| auto | The browser decides the justification algorithm. |
| none | Disable justification. |
| inter-word | Increase/decrease the spacing between words. |
| inter-ideograph | Justify content using ideographic text. |
| inter-cluster | Justify only content that does not contain internal word spaces (such as Asian languages). |
| distribute | Similar to newspaper layout, except that in East Asian languages the last line is not justified. |
| kashida | Justify content by stretching characters. |