CSS3 text-align-last
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The text-align-last
CSS property specifies how the last line of a block or a line right before a forced line break is aligned when text-align
is justify
.
The following table summarizes the usages context and the version history of this property.
Default value: | auto |
---|---|
Applies to: | Block containers |
Inherited: | Yes |
Animatable: | No. See animatable properties. |
Version: | New in CSS3 |
Syntax
The syntax of the property is given with:
The example below shows the text-align-last
property in action.
Example
Try this code »p {
-moz-text-align-last: right; /* Firefox */
text-align-last: right; /* Standard syntax */
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
auto |
The last line is aligned per the value of the text-align property, unless the text-align is set to justify . This is default value. |
start |
Same as left if direction is left-to-right and right if direction is right-to-left. |
end |
Same as right if direction is left-to-right and left if direction is right-to-left. |
left |
The last line is aligned to the left. |
right |
The last line is aligned to the right. |
center |
The last line is center-aligned. |
justify |
The last line is justified like the other lines in the block. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element text-align-last property. |
Browser Compatibility
The text-align-last
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS Alignment.
Related properties: text-align
, text-indent
, text-justify
.