Reputation: 4984
Is it possible to set font size so that the text fills the available space and then changes its size with the p
element if the window is resized?
In my demo (link rotten as of March 2015) the text in paragraph two is set to fill the paragraph by trial and error and if the window is resized the text wraps.
Upvotes: 0
Views: 209
Reputation: 25485
FitText is just the ticket if you want to use it for a headline, not recommended for entire paragraphs though.
EDIT
FitText seems to need adjusting to get a proper fit...
Sure, every case is different. Out of the box it does work well though, here's a demo with the default $("#fittext1").fitText();
setting for the compressor and minor changes to the CSS.
http://jsfiddle.net/panchroma/mSt5Y/
Upvotes: 1