Fandom

HTML & CSS Wiki

Text-align-last

649pages on
this wiki
Add New Page
Comments0 Share

The CSS text-align-last property sets how to align the last line or only line of text in the object. It 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.

ValuesEdit

Value Description
inherit Explicitly sets the value of this property to that of the parent.
auto Default. Text is aligned like the other lines in the object, using the value of the text-align property.
center Text is centered.
justify Text is justified.
left Text is aligned to the left.
right Text is aligned to the right.


HTML example:

<div style="text-align:justify; text-align-last:right;">The text is
double justified, and the last line should be aligned to the right.</div>


CSS example:

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.