Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Textarea horizontal scroll

I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The browsers that I use are IE 6+ and Mozilla 3+.

like image 493
Shyam Avatar asked Jan 08 '09 13:01

Shyam


1 Answers

I figured out to do it in a non-W3c-compliant way and it is working in both IE and Firefox and incidentally in Chrome too.

I added the attribute wrap with value off, that is <textarea cols=80 rows=12 wrap='off'> is what I have done.

like image 187
Shyam Avatar answered Sep 25 '22 10:09

Shyam