0

Possible Duplicate:
Auto-size dynamic text to fill fixed size container

How can I get this text to shrink/enlarge the font-size automatically to fit perfectly wrapped into the box size?

I'm trying to do this with HTML & CSS but I don't see any option. I don't mind using javascript/jquery if there is a way.

text overflowing the container

Community
  • 1
  • 1
user1094607
  • 147
  • 2
  • 12

2 Answers2

3

Something like this maybe?

http://jsbin.com/opuzur/3/edit

Edit: Of course someone had already come up with a better solution... Check out the link in John's comment, has some good solutions! Still, it was good fun to have a crack at it! :)

Jan
  • 5,688
  • 3
  • 27
  • 44
1

Try the jQuery truncation plugin trunk8

Abhilash M A
  • 564
  • 5
  • 12