PDA

View Full Version : is justification of text possible?


Jinnifah
04-26-2003, 02:05 AM
Hi all
I have another dumb question

is it possible to justify text?
If so, how?

liorean
04-26-2003, 02:24 AM
originally from [CSS1] (http://www.w3.org/TR/REC-CSS1#text-align):

5.4.6 'text-align'

Value: left | right | center | justify
Initial: UA specific
Applies to: block-level elements
Inherited: yes
Percentage values: N/A

This property describes how text is aligned within the element. The actual justification algorithm used is UA and human language dependent.

Example:

DIV.center { text-align: center }

Since 'text-align' inherits, all block-level elements inside the 'DIV' element with 'CLASS=center' will be centered. Note that alignments are relative to the width of the element, not the canvas. If 'justify' is not supported, the UA will supply a replacement. Typically, this will be 'left' for western languages.

CSS1 core: UAs may treat 'justify' as 'left' or 'right', depending on whether the element's default writing direction is left-to-right or right-to-left, respectively.

pardicity3
04-26-2003, 05:52 AM
hmm, along this line: I have noticed in some cases that text-align: justify tends to make its containing box a little bit wider. I once had a site where if I changed the text to justify (and that's all I did mind you) it would give the page horizontal scroll bars. But if it was just plain left align there were no scroll bars. Very interesting indeed...Anyone else noticed this?