Question

I'd like to add a description field to an application that can be as long as several lines (or even paragraphs) or as short as a one-liner.

Instead of taking up a lot of screen real estate or have scroll bars, it would be preferable to have the textbox grow based on its input.

On IE6 adding Style="overflow-y:visible" accomplishes this nicely (both on display of read only, and if we are in edit mode).

However, it has no effect on Firefox, or IE7 for that matter.

Is there a relatively easy fix for this?

Thanks!

Was it helpful?

Solution

You can accomplish this using jquery if you want to go down that route. It's a nice effect, kind of like the comment textarea in facebook.

http://javascriptly.com/examples/jquery-grab-bag/autogrow-textarea.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top