Results 1 to 3 of 3

Thread: Autoresizing text according to space in frame, div or whatever

  1. #1
    Join Date
    Jun 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Autoresizing text according to space in frame, div or whatever

    hi, i'm allowing myself to double post since i think that my first post didn't reach it's target audience (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.

    TEXTE LONG
    txt

    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.

  2. #2
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default There is a way

    You have to resize the iframe dynamically untill scrollbars appear. Then make the iframe size one pixel greater than when the scrollbars appeared.

  3. #3
    Join Date
    Jun 2006
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •