Justin Dickinson
Helps Make the Internet

Justin Dickinson Hi, how's it going? I'm Justin. I live in Brooklyn and design at Vimeo I like to cook and look at things on the Internet.

I share all the cool things I find at A Variety of Things. I think bears are awesome. You should definitely watch some of my favorite videos.

I'm on Twitter but don't use it that much. If you want to say hi that's cool too.

CSS problem - possible solution →

via @chriscoyier

The proposed problem was centering the final line of a justified paragraph (see link).

One option is to wrap that final line in a span with style=”display:block;text-align:center”. This solves the problem. But introduces another: scalability.

I am sure you could write a jquery function to parse through a paragraph and isolate the last, say, four words and wrap them in such a span. This would programatically solve the problem and eliminate the need for tedious hand-coding.

Notes