I like Chrome's nifty textarea resize control. However, the one exception is that the textarea appears to have a hard min-height/min-width setting that's not changeable via custom css, even with !important qualifiers.
textarea#myTextArea{min-height:0 !important;min-width:0 !important}
Is it possible to override this via jQuery perhaps?
In some cases, there is a need of putting a limit on the size of characters that can be typed in a textarea. So in that case, we can use maxlength attribute to control the number of characters entered in a textarea.
Resize a text box Select the text box. Select one of the handles and drag until the text box is the size you want.
The resize property defines if (and how) an element is resizable by the user. Note: The resize property does not apply to inline elements or to block elements where overflow="visible". So, make sure that overflow is set to "scroll", "auto", or "hidden".
These "min-height
/min-width
" rely on cols
and rows
attributes.
Eg. if cols
is missing or less than 1, its default value is 20, so the minimum width will be 20 characters width.
(cf. http://www.w3.org/TR/html5/forms.html#the-textarea-element)
The fact you cannot resize a textarea
under its initial dimensions is reported as a bug (https://code.google.com/p/chromium/issues/detail?id=94583) although
The user agent may restrict the resizing range to something suitable, such as between the original formatted size of the element, and large enough to encompass all the element's contents.
http://www.w3.org/TR/css3-ui/#resize
Unfortunately it seems there's no way for now to change this behaviour.
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