No, it's not possible to disable scrolling. The internal behavior of form components is one of the hardest things to control. From browser to browser different items are hard coded, e.g. Opera and Safari make cross-browser form styling much more difficult because they impose certain style features which IE and FF are more willing to defer to your stylesheet on. So this is one of the nastiest topics in HTML which makes it difficult to create designs which will work reliably for the entire audience of users who visit your website.
The scroll bar of a <textarea> element is default behavior in all browsers. It works as if the textarea had the CSS declaration overflow: auto; If the content fits, then there's no scrollbar, but if the content exceeds the visible area of the textarea, then it is clipped and a scrollbar appears. (Note: in some browsers, the scrollbar is visible all the time but simply appears inactive (grey color) when not needed.
You can play with the overflow property and remove the scrollbar, but people can still use the arrow keys to move up and down through everything they've written so that "might" work depending on why you want to disable scrolling.
A better choice may be to use <input type="text"> That will only allow them to type on one line so there is no issue with scrollbars. And if your goal is to limit the amount that they can type, the <input type="text"> element has a major advantage, it supports a maxlength attribute which specifies how many characters someone can type into the field. That's the only way you can really limit how much users can type in. It's used a lot for address forms set to 2 for state and 5 for zip codes so that people have to use the correct number of digits (it won't stop a hacker, but it's a good usability tool). Textarea has no way to limit user input.
Hope that helps, if it doesn't please explain the "purpose" you're trying to achieve and maybe we can assist further.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|