0

I'm working on some mobile content which has loads of text in numerous pages.

I gave them the property text-align: justify; which usually works well and hence makes the text become much more readable and good-looking.

Although in some situations, the justifications sucks since it leads to unnecessary spaces between words.

enter image description here

How can I improve this styling so that it performs better in various situations?

Can
  • 4,516
  • 6
  • 28
  • 50

1 Answers1

0
  • Reduce font-size and/or letter-spacing so more words can stretch better on the same line
  • Use optional breaks (<wbr>, &shy;) inside long words

Apart from the above you can write some JS-CSS that do a custom streching but you can't really change the rules of geometry and the default one is quite close to optimal.

Szabolcs Páll
  • 1,402
  • 6
  • 25
  • 31
  • I doubt if he wants ``. That would randomly break lines there in the middle of the word with no hyphen. –  Aug 24 '15 at 08:57
  • edited to match http://stackoverflow.com/questions/226464/soft-hyphen-in-html-wbr-vs-shy – Szabolcs Páll Aug 24 '15 at 09:30