text-align-last property
Specifies the alignment type of the last or only line of text in the element's contents.
If you want to align text horizontally within an element, use the text-align property.
JavaScript page for this property: textAlignLast. You can find other example(s) there. |
Possible values:
One of the following values:
Default. The text content of the element is aligned like the other lines in the object. | |||||||
The text content of the element is centered. | |||||||
The text content of the element is justified. | |||||||
Aligns the text content of the element to the left. | |||||||
Aligns the text content of the element to the right. |
Default: auto.
Example HTML code 1:
This example illustrates the use of the text-align-last property:
|
||||
<head> <style> .lastLeft { text-justify: distribute; text-align: justify; text-align-last: left; } .lastJustify { text-justify: distribute; text-align: justify; text-align-last: justify; } </style> </head> <body> <div class="lastLeft"> The text of the first line is justified alonglonglonglonglonglonglonglonglongword. Next line is justified, too alonglonglonglongword. The last line is aligned to left. </div> <br /> <div class="lastJustify"> The text of the first line is justified alonglonglonglonglonglonglonglonglongword. Next line is justified, too alonglonglonglongword. The last line is justified, too. </div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
address, blockQuote, body, caption, center, col, colGroup, dd, dir, div, dl, dt, fieldSet, form, H1, H2, H3, H4, H5, H6, html, isIndex, legend, li, listing, marquee, menu, ol, p, pre, table, textArea, ul, xmp
Related pages:
color
font
font-family
font-size
font-size-adjust
font-style
font-variant
font-weight
text-align
text-autospace
text-decoration
text-indent
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
font
font-family
font-size
font-size-adjust
font-style
font-variant
font-weight
text-align
text-autospace
text-decoration
text-indent
text-justify
text-kashida-space
text-overflow
text-shadow
text-transform
text-underline-position
External links:
User Contributed Comments