View Full Version : Autoresizing text according to space in frame, div or whatever

03-08-2007, 03:03 PM
hi, i'm allowing :rolleyes: myself to double post since i think that my first post didn't reach it's target audience :D (feel free to yell at me for doing that, or simply move or delete my post)

so here it is...

i explain what i want to do:

i have a text coming from a database, sometimes this text is 2 chars or somtimes 6 chars.
this text comes in an iframe with background and fixed size.

what i would like is the text to resize automaticaly to FILL the frame to keep visual impact whatever the content, so the font size would shrink if the text is long and grow if the text is short.


something like this but dynamic of course, text is short do it gros to fill space and if text is longs it shortens so it stays completely visible in this space too.

thanks for any help.

03-09-2007, 10:04 PM
You have to resize the iframe dynamically untill scrollbars appear. Then make the iframe size one pixel greater than when the scrollbars appeared.

03-15-2007, 08:22 AM
i'm not sure this will work according to different text lengths..

i didn't have time to work on this (priority level) but l'll check it later..

thanks for your help