Possible Duplicate:
resize font to fit in a div (on one line)
For a small flashcard maker app I need to set the correct font size so text would fill all the available width of a fixed-size container; like the text in the four boxes in this picture:

A solution using PHP GD has been provided to this question. Is there a client side solution with css or javascript to this problem?
it’s not brute force 😉
HTML:
CSS:
JS (using JQuery):
fiddle here: http://jsfiddle.net/cwfDr/
All right, now it covers both height and width. 😉