I have a site with a textarea that is a very specific size; resizing it could make the user think that they can enter more text into the textarea than is possible (it is limited by rows and columns). Firefox 4 automatically shows a 'resize handle' in the bottom-right of the textbox and as a user I can resize the textarea on the page. Is there any way to disable this?
Thanks.
To set the width and height of the textarea of your own choice, you can specify the desired number of rows and columns. For this, we can make use of rows and cols attributes of <textarea> tag. Following is the code shown below along with the output.
To disable resizable property of an element use resize to none. It is the default value.
To prevent a text field from being resized, you can use the CSS resize property with its "none" value. After it you can use the height and width properties to define a fixed height and width for your <textarea> element.
Use CSS and style it with:
textarea { resize: none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With