views:

44

answers:

1

Is it possible to dynamically control the font size in a text area / text box so it decreases while the user types? (ie the character i+1 is smaller than character i)

Thanks

+2  A: 

No, it's not possible in a text area or a text box. The font-size specified for those controls will affect all text in them. You could, however, achieve the effect by using a regular <div> and making its content editable, as is done in WYSIWYG editors.

Here's a simple example.

Cory Larson