text-justify

解説

W3Cで審議中のものを IE が独自に採用したもの。text-alignプロパティの値がjustifyのとき、テキストの均等割付の形式を指定します。日本語の長文にはinter-ideograph、英文にはnewspaperを用いるのが本来の使用目的らしいです。また、改行した複数行の幅を揃えたい場合には、distribute-all-linesを用いるのが良いでしょう。

autoブラウザに依存する。IE5やIE6では、スペースを調整して均等割付する
distribute単語間隔と文字間隔を調整して均等割付する
distribute-all-lines単語間隔と文字間隔を調整して均等割付する。途中の改行や最終行などの文字数が一行に満たない行も均等割付される
inter-clusterアジアの言語など単語間隔を持たない言語を均等割付する
inter-ideograph日本語・中国語・韓国語など表意文字の単語間隔と文字間隔の両方を調整して均等割付する
inter-word単語間隔のみを調整して均等割付する
kashidaアラビア文字の均等割り付けを意図している
newspaper単語間隔と文字間隔を調整して均等割付する。

プロパティ情報

値:auto,distribute,distribute-all-line,distribute-center-last,inter-cluster,inter-ideograph,inter-word,kashida,newspaperのいずれか
初期値:auto
適用対象:ブロック要素
継承:する
パーセンテージ:不可
適用メディア:視覚
レベル:MSIE5〜

参照

使用例

ソース

CSSの記述方法はスタイルシートってなに?も参照下さい。

<p style="text-align: justify; text-justify: auto">
autoの場合
</p>
<p style="text-align: justify; text-justify: distribute">
distributeの場合
</p>
<p style="text-align: justify; text-justify: distribute-all-lines">
distribute-all-linesの場合
</p>
<p style="text-align: justify; text-justify: inter-cluster">
inter-clusterの場合
</p>
<p style="text-align: justify; text-justify: inter-ideograph">
inter-ideographの場合
</p>
<p style="text-align: justify; text-justify: inter-word">
inter-wordの場合
</p>
<p style="text-align: justify; text-justify: kashida">
kashidaの場合
</p>
<p style="text-align: justify; text-justify: newspaper">
newspaperの場合
</p>

表示結果

autoの場合

distributeの場合

distribute-all-linesの場合

inter-clusterの場合

inter-ideographの場合

inter-wordの場合

kashidaの場合

newspaperの場合