Dynamic text field height scaled to fit content?

The thread title is pretty self-explanitory… I am wondering if it’s possible to get a dynamic text field’s height to scale automatically to fit the content inside of it. I’ve seen some “brute force” solutions of calculating character width and line height, and number of characters per line, but that won’t work for me, as I have a variety of CSS-styled text that wll be of varying size and position.

Any ideas? Thanks…