Is there a way to make a HTML textarea element to allow only one line?
I want to do this because I will have a button to expand it, but if user is allowed to enter multiple lines when the textarea is not expanded (only 1 row) it doesn look very nice, and if I use a textbox for the not expanded state, it looks weird when I replace it with the textarea and expand it with animation.
You can put jQuery to use to create such field effect. See the demo here.
http://www.9lessons.info/2010/03/facebook-like-expanding-textbox-with.html