I have a textarea:
<textarea cols="1" rows="1" style="width:500px; height:200px;"></textarea>
For some reason I can't make it smaller when resizing with mouse cursor in Chrome though in Fifefox it works fine. What have I missed?
A simple way to ensure that the control is not resizable is to add an explicit style="resize: none;" attribute on the textarea element using the HTML Form Element Attributes property.
# Auto Resize a `<textarea>` with an `autosize` Attribute First, a regular `<textarea>`. <textarea>Will NOT auto resize. </textarea> Now add an attribute to tell the element to automatically resize on input, i.e. `<textarea autosize>`. <textarea autosize>Will auto resize.
To disable resizable property of an element use resize to none. It is the default value.
Specifying a min-width to your <body> element will prevent auto-resizing.
You've done nothing wrong, your code is correct, but you've encountered a bug in Chrome: https://code.google.com/p/chromium/issues/detail?id=94583
It treats your css height value as a min-height value, a bug that's been around for at least 2 years
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