HTML : doubt in textarea tag
when a normal HTML <textarea>
tag is used, the size of the <textarea>
can be altered by the user by clicking on the bottom right corner and dragging it. I n开发者_如何学编程otice this in many places including textareas in SO. How can I disable this resizing? Is there any way to do that?
That's a feature provided by the browser rendering engine, not HTML itself. You can override it with CSS:
<textarea style="resize: none;">some text here</textarea>
(For Chrome) you can add some CSS to do this, as shown below:
textarea {
resize: none;
}
Use the resize attribute on the textarea;
textarea {
resize: none;
}
You can also specify horizontal|vertical|both ad the value.
精彩评论