Justify text to fill a div

Tyilo picture Tyilo · Jun 1, 2011 · Viewed 17.4k times · Source

What i want to do is something like this:

1 2 3 4 5
6       7
8 9 10 11

With this code:

<div style="text-align: justify;">
1 2 3 4 5
<br>
6 7
<br>
8 9 10 11
</div>

But it doesn't work, and displays like this:

1 2 3 4 5
6 7
8 9 10 11

Answer

Kalessin picture Kalessin · Jun 1, 2011

In DTP and word processing applications, this option is known as 'force justify'. Unfortunately, this is not an option in CSS.