text-align-last

« CSS « CSS Reference

Summary

The text-align-last CSS property describes how the last line of a block or a line, right before a forced line break, is aligned.

Syntax

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

Values

auto
The affected line is aligned per the value of text-align .
start
The same as left if direction is left-to-right and right if direction is right-to-left.
end
The same as right if direction is left-to-right and left if direction is right-to-left.
left
The inline contents are aligned to the left edge of the line box.
right
The inline contents are aligned to the right edge of the line box.
center
The inline contents are centered within the line box.
justify
The text is justified. Text should line up their left and right edges to the left and right content edges of the paragraph.

Examples

div {
  text-align: justify;
  -moz-text-align-last: center;
  text-align-last: center;
}

Browser compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support --
WebKit bug 76173
12.0 (12.0) -moz 5.5 -- --
WebKit bug 76173
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support --
WebKit bug 76173
12.0 (12.0) -moz 6.0 -- --
WebKit bug 76173

In Internet Explorer, the start and end values are not supported.

Specifications

Specification Status Comment
CSS Text Module Level 3 Working Draft  

See also

Tags (4)

Edit tags

Attachments (0)

 

Attach file