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

  1. create new hidden div
  2. set width 600 , leave height
  3. loop through javascript reducing font-size until height <= 400

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -