jquery - CSS: Dynamic Font Size; span entire width of div -
possible duplicate:
auto-size dynamic text fill fixed size container.
let's have div 600 px high , 400 px wide. want text in middle of this, , span entire width of div. there in css or css3 let me auto based on how text user inputs?
so, word foo larger word foobar foobar take more space, dynamically resizing text.
just wondering; i'm not sure if it's possible (would acceptable have js solution too..)
thank you!
one solution can think is:
let says max size can have typing word foo
in box 200px
so create new hidden div set fixed width of 600 not height, loop through
- create new
hidden div
- set
width 600
, leave height loop
through javascript reducing font-sizeuntil height <= 400
Comments
Post a Comment