STRML / textFit

A jQuery-free component that quickly fits single and multi-line text to the width (and optionally height) of its container.
https://textfit.strml.net
637 stars 123 forks source link

textFit gives error saying "you didn't set a static height and width" but I did. #40

Closed slonkazoid closed 4 years ago

slonkazoid commented 4 years ago

Error: Set a static height and width on the target element <a class="c1 arial" style="width: 400px; height: 20px;">Text</a> before using textFit!

As CLEARLY seen above, I have set the width and height. But it is still giving errors.

slonkazoid commented 4 years ago

FIXED! I didn't set display: block; so the dimensions were ignored