CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES
Advertisements

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:

text-align-last: 
auto | start | end | left | right | center | justify | initial | inherit

The example below shows the text-align-last property in action.

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.

Browsers Icon

Basic Support—

  • Firefox 12+ -moz-
  • Google Chrome 35+
  • Internet Explorer 5.5+
  • Apple Safari ×
  • Opera ×

Further Reading

See tutorial on: CSS Alignment.

Related properties: text-align, text-indent, text-justify.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties