I just want a question to my answer. All that lip is unnecessary.
neither was posting in this thread. "new thread" takes one click. "Post reply" takes two. and yet you've now posted a reply four times, in a very trollish fashion, because you actually think that thread necromancy can be shrugged off just for you. Not that the fact that this is an old thread is the main problem, IMO- We still don't have the information necessary to answer your question; what are you fitting the text into? a div tag? a table? a page? a textbox? Additionally, if it's HTML, the browser makes sure it fits as long as you don't make any style changes; if you have a div tag:
<div style="border : 2px solid black;">text goes here</div>
then the border will ALWAYS fit the enclosed text, so I think the question is what exactly do you mean by "fit". My suggestion should be taken seriously: create a new thread explaining your issue, in detail; this ensures that more people will see it, too, as many visitors don't view new posts in old threads on the pre-supposition that it is probably some form of spam. I only saw this thread because I thought the real OP was posting; I didn't notice the date of the thread until near the end, when I was about to reply to the ridiculous notion of using javascript for sizing, then I saw the last few replies here. Basically, the rule for starting new threads benefits topic starters, as well. More members are likely to view the post.
Start a new thread, add in some of these details:
are you using HTML? CSS? what exactly do you mean by "fit", and what are you trying to fit the text into? (as I noted above, most HTML elements will automatically resize based on their contents, and therefore no specific action is required to get text to "fit" unless a style was previously defined that makes it not fit, in which case you simply remove that style attribute and your good to go. A little explanation of what you mean is necessary; perhaps some examples, even, of what you mean.
edit: oops, he's gone now. oh well.