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+.
+1
A:
Try these:
overflow: scroll;
overflow-y: scroll;
overflow-x: scroll;
overflow:-moz-scrollbars-vertical;
there should also be a -moz-scrollbars-horizontal
Filip Ekberg
2009-01-08 13:26:04
+8
A:
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.
Shyam
2009-01-09 07:21:56
thanks ....I was looking for this too
Tommy
2009-11-09 21:40:58
A:
zassssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
when i write like that without pressing enter and use pre tag to show message as it is, i have got a problem that it extend space, i all i want is it gives new line after specific width
jaid
2010-09-10 06:57:29