/textfit

jQuery plugin to make text fit it's container.

Primary LanguageHTML

textfit.js

jQuery plugin to make text fit it's container.

How it works

First I append a div around the inner text. Then, I can compare the ratio between the text width, and the container width. Finally, I use that ratio to set the font size. Easy peazy.

Setup & options

Check out the demo here.