The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element.
Overview tableauto
textAlignLast
text-align-last: auto
text-align-last: center
text-align-last: end
text-align-last: justify
text-align-last: left
text-align-last: right
text-align-last: start
left
if direction is left-to-right and right
if direction is right-to-left.
right
if direction is left-to-right and left
if direction is right-to-left.
start
value if otherwise.
The following example shows an embedded style rule that justifies all the lines in the document’s p elements. This is sometimes found in East Asian typography.
<p class="normal">Simple example with "auto" value of text-align-last property. This paragraph needs to be really long in order to show how to work with text-align-last property. It only works because we set a width for this paragraph though.</p>
<p class="justified">Simple example with "justify" value of text-align-last property. In this case, the last line is also justified. This paragraph needs to be really long in order to show how to work with text-align-last property.</p>
.normal {
width: 300px;
text-align: justify;
text-align-last: auto;
}
.justified {
width: 300px;
text-align: justify;
text-align-last: justify;
}
Related specifications
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4