0

Is there a way with CSS to reduce the letter spacing when the text tries to wrap?

For example, if I have a paragraph within a fixed width parent like so:

| Here is some |
| text         |

Is it possible, instead of wrapping the text to the next line, to reduce the letter spacing automatically to force it to fit without overflowing the parent div, like so:

DEMO HERE

Fizzix
  • 22,389
  • 37
  • 108
  • 168

2 Answers2

0

I did some research and, as I expected, currently it isn't possible without javascript. If this isn't a problem for you check this answer: CSS text justify with letter spacing

Community
  • 1
  • 1
kbtz
  • 12,311
  • 8
  • 48
  • 69
0

Try to use white-space set according to you.

white-space:nowrap and letter-spacing:-1px; 
  • As stated in my question, this has to be automated. Not by applying a class to each individual block of text that I need to reduce the letter spacing on. – Fizzix Jun 19 '14 at 07:54