Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves the type of alignment used to justify text in the object .
Syntax
{ text-justify : sAlign } |
object.style.textJustify [ = sAlign ] |
Possible Values
sAlign | String that specifies or receives one of the following values.
|
The property is read/write for all objects except the following, for which it is read-only: currentStyle . The property has a default value of auto . The Cascading Style Sheets (CSS) attribute is inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
For this property to affect text layout, the textAlign property must be set to justify .
The property applies to block elements.
Examples
The following examples use the text-justify attribute and the textJustify property to align text within the object.This example uses an inline style sheet to distribute all the lines within the object.
... <DIV style="text-align:justify; text-justify :distribute-all-lines;"> This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. </DIV>
This example uses inline scripting to change the alignment of the text when an onmouseover event occurs.
... <DIV style="cursor:hand; text-align:justify;" onmouseover="this.style. textJustify ='distribute-all-lines';" onmouseout="this.style. textJustify ='auto';"> This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. This is something. This example demonstrates how to use this property. </DIV>
Standards Information
This property is part of a proposed addition to Cascading Style Sheets (CSS) .
Applies To
|
ADDRESS , BLOCKQUOTE , BODY , CENTER , currentStyle , DD , DIR , DIV , DL , DT , FIELDSET , FORM , hn , HR , LEGEND , LI , LISTING , MARQUEE , MENU , OL , P , PLAINTEXT , PRE , runtimeStyle , style , TABLE , TD , TH , TR , UL , XMP |
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |