CSS3 text-align-last

text_align_last_center

.caption {
    text-align: justify;
    text-align-last: center;
}

The text-align-last property describes how the last line of a block or a line right before a forced line break is aligned when ‘text-align’ is ‘justify’, which means you gain full control over the alignment of the last line of a block.

As seen in the example above it allows you to have the caption’s alignment set to justify;, except for the last line (normally it would end up left aligned). Available in Webkit (under a flag).

Improving your site’s visual details: CSS3 text-align-last →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.