I have a div that has text-align: center . It should contain various texts that may or may not be wrapped. When it wraps around, I would like each line to be about the same length, so it would show:
Fast brown fox jumping
over a lazy dog.
instead:
Fast brown fox jumps through lazy
dog.
Basically, I'm looking for a clean CSS way that automatically puts a gap in the center of the text.
I know there are JavaScript solutions, and I have currently implemented a server-side solution, but I always try to learn more CSS to make things more flexible in the future.
source share