text-align-last Attribute | textAlignLast

HTML (DHTML)

text-align-last Attribute | textAlignLast Property

Internet Development Index

Sets or retrieves how to align the last line or only line of text in the object.

Syntax

HTML { text-align-last : sAlignLast }
Scriptingobject.style.textAlignLast(v) [ = sAlignLast ]

Possible Values

sAlignLastString that specifies or receives one of the following values.
autoDefault. Text is aligned like the other lines in the object, using the value of the textAlign property.
centerText is centered.
inheritText is aligned like the text in the parent object.
justifyText is justified.
leftText is aligned to the left.
rightText is aligned to the right.

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 proposed 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

The property is read-only for the currentStyle object.

The property applies to block elements.

Example

The following example shows an embedded style rule that justifies all the lines in the document's p elements. This is commonly found in East Asian typography.

<STYLE>
P.DistributeAllLines { text-align: justify;
text-justify: distribute;
text-align-last: justify }
</STYLE>

Standards Information

There is no public standard that applies to this property.

Applies To

ADDRESS, BLOCKQUOTE, BODY, CENTER, currentStyle, CUSTOM, DD, DIV, DL, DT, FIELDSET, FORM, hn, HR, ISINDEX, LI, LISTING, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, style, UL, XMP