Thetext-align-last CSS property describes how the last line of a block or a line, right before a forced line break, is aligned.
/* Keyword values */ text-align-last: auto; text-align-last: start; text-align-last: end; text-align-last: left; text-align-last: right; text-align-last: center; text-align-last: justify; /* Global values */ text-align-last: inherit; text-align-last: initial; text-align-last: unset;
| Initial value | auto |
|---|---|
| Applies to | block containers |
| Inherited | yes |
| Media | visual |
| Computed value | as specified |
| Animation type | discrete |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
autotext-align, unless text-align is justify, in which case the effect is the same as setting text-align-last to start.startleft if direction is left-to-right and right if direction is right-to-left.endright if direction is left-to-right and left if direction is right-to-left.leftrightcenterjustifyauto | start | end | left | right | center | justify
p {
font-size: 1.4em;
text-align: justify;
text-align-last: center;
} | Specification | Status | Comment |
|---|---|---|
| CSS Text Module Level 3 The definition of 'text-align-last' in that specification. | Working Draft | Initial definition |
| Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support |
35 — 471 47 |
Yes |
12 — 53 -moz- 49 |
No | Yes | No2 |
| Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
|---|---|---|---|---|---|---|---|
| Basic support | No |
35 — 471 47 |
Yes |
12 — 53 -moz- 49 |
No | Yes | No2 |
1. From version 35 until version 47 (exclusive): this feature is behind the Enable Experimental Web Platform Features preference (needs to be set to true). To change preferences in Chrome, visit chrome://flags.
2. See Webkit bug 76173.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last