Is it possible to resize text to fit a fixed size div?

Posted by int3 on Stack Overflow See other posts from Stack Overflow or by int3
Published on 2010-03-23T02:55:23Z Indexed on 2010/03/23 3:01 UTC
Read the original article Hit count: 241

Filed under:
|
|

This seems like a pretty natural use case to me, though I haven't been able to find anything on it:

Say I have a fixed-width div that is dynamically populated with some number. What's the best way to ensure that numbers with more digits take smaller font sizes such that they fit nicely into that fixed width? Is there some CSS property for this, or do I have to resort to Javascript hackage?

© Stack Overflow or respective owner

Related posts about css

Related posts about div