I need to display user entered text into a fixed size div. What i want is for the font size to be automatically adjusted so that the text fills the box as much as possible.<
If by text length you mean character count, there is this article which points to a short jquery snippet Change Font Size dynamically based on Character count
http://jsfiddle.net/jfbrLjt2/
$('.text').each(function(){
var el= $(this);
var textLength = el.html().length;
if (textLength > 20) {
el.css('font-size', '0.8em');
}
});