How to scale font to take a unit as a whole?

0 like 0 dislike
The success of habré easy startup You — super feat me Sunday evening to dig in the direction of his mood Brightener only (sorry IE users).

It only works in 1280x1024 resolution, and to calculate the size of the font used "magic" code = (900 - 3 * message.length) + '%';. This is still the problem if someone is using + "+".

And how to make the font size were selected to fill the div? Maybe it is possible to adaptively increase and how to calculate the size of the resulting block?

Upd. Had to deal with. The link everything works...
by | 16 views

1 Answer

0 like 0 dislike
"Quick and dirty" solution:
(put change font size on page load, resize window and text input)
Slow, but you can bring to mind.
110,608 questions
257,186 answers
32,909 users