TextFit Examples

TextFit respects existing CSS and fits within the box it is placed, regardless of padding, line-height, font-face, or letter-spacing.

TextFit does not require jQuery.

These examples are run in slow motion using setInterval to show how they work. Actual sizings are invisible and average <2ms.

View source to see how options are applied.

Text
Centered Text
Multiline
Text
Vertically Centered Text
Centered
Multiline
Text
Set a Maximum
Font Size
Use Any Letter Spacing
Use Any Line Height
Use Any Custom Font Face
Use Any Custom Padding
Created by STRML