Text-align justify but to the right?

I believe you might want something like this:

direction:rtl;
text-align:justify;

Example: http://jsfiddle.net/aew75/


It can be solved by adding text-align-last:

div.a {
    text-align: justify;  /* For Edge */
    text-align-last: right;
}

Source: link


text-align-last: right;
-moz-text-align-last: right;

If I understand the question correctly, the issue is really just how to right-align the last line of a justified block of text. The above does just that, using a property in CSS 3 Text (with a vendor prefix version for better support), supported by modern browsers though not universally.

Though setting the writing direction to right-to-left causes this, among other things, it has several other, more fundamental effects. You may get away with it, if you don’t ever have inherently right-to-left characters in the text.

Tags:

Html

Css

Layout