This property can be used in conjunction with the ‘text-align’ property, but the value specified overrides the effects of that property on the horizontal alignment of the last or only rendered line of an element.

Examples

div { text-align: justify; text-align-last: right}

<div STYLE=”text-align: justify; text-align-last: right”>this
div text is double justified, and the last (or only) line should be right-aligned</div> 

 

Possible Values

Value Description
left Left aligns the content on the last or only rendered line of the element.
right Right aligns the content on the last or only rendered line of the element.
center Center aligns the content on the last or only rendered line of the element.
inherit Explicitly sets the value of this property to that of the parent.
auto Text content on the last line is aligned according to the value of the ‘text-align’ property, the default text-alignment for the block or its inherited ‘text-align’ value.
justify Applies double text justification to the content on the last or only rendered line of the element.

 

 

4 Responses to “CSS TEXT-ALIGN-LAST”

  1. ScoDal Says:

    This is wonderful information but.. what about alignment for images as backgrounds with CSS? I often use designs and pictures that for CSS backgrounds and I can’t figure out how to align them so I can match pixels perfectly. Do you know anything of the such?

  2. ozobalu Says:

    u hit what u focus on

  3. luke Says:

    interesting

  4. answered Says:

    @ ScoDal :

    no possibility for css 2 or lower :P

    but ftw: http://www.css3.com/css-background-position-y/

Leave a Reply