No horizontal scrollbar for textarea fix
Jun 23rd, 2008 by Leonard Ghazarian |
Email This Post
|
Print This Post
Lately clients have been asking for long textareas to fit either their terms & conditions or their policy which visitors need to agree to before submitting a form.
Even though you specify the cols and rows, the scrollbar does not show up for visitors to easily scroll down to read all the text. This is an issues in IE and FF.
Here is a workaround to the issue.
overflow-y: scroll;
overflow-x: hidden;
overflow:-moz-scrollbars-vertical;
So your code will look like this:
This should fix your problem for Firefox and Internet Explorer browsers. Just apply it to the style or your separate CSS file.
Also, you can specify “Read Only” (see code above) to not allow visitors to change the text contained in the textarea.


Thank you so much!