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

0 like 0 dislike
9 views
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 centered.style.fontSize = (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 | 9 views

1 Answer

0 like 0 dislike
"Quick and dirty" solution:
\r
\rpastebin.com/N8N4iN79
\r
(put change font size on page load, resize window and text input)
\r
Slow, but you can bring to mind.
by
110,608 questions
257,186 answers
0 comments
1,139 users