3

I'm trying to come up with an example that experiments with different alignments as a demonstration. It's easy to left, center, right, justify, and center-left-justify text, as seen in my demonstration:

a

You can see this example here on JSBin. How can I get right-justified text without the punctuation getting messed up? (Notice the period to the left on the last line of the center-right-justified text.)

Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411

1 Answers1

4

This should work in IE (only):

text-align: justify;
text-align-last: right;

It doesn't look like there is a great cross-browser solution, but this might help:

Justify the last line of a div?

Community
  • 1
  • 1
trevorp
  • 1,161
  • 1
  • 14
  • 19