A jQuery plugin for fitting text into divs

This project is maintained by michikono

jQuery Boxfit

Boxfit is a jQuery plugin for resizing text. It will scale text to fit inside a fixed width div. Boxfit respects padding settings for the div. While boxfit will not scale images, it will handle text with other visual entities mixed in.


Standard example


Standard example with too much text

No wrapping allowed. This can sometimes makes things awkward/shrink.

Text wrapping enabled

this is some cool text I want to fit here

Max font size

Max font size 36

Turn off centering and alignment

Inherit alignment settings

Multiple at once :)

Example huge cells
Example huge cells