The min-width seems to be ignored, I cannot scale less than 200px;
Any workaround?
<textarea style='width:200px; max-width:400px; min-width:100px'>
text
</textarea>
The min-width seems to be ignored, I cannot scale less than 200px;
Any workaround?
<textarea style='width:200px; max-width:400px; min-width:100px'>
text
</textarea>
That's how it's suppose to work! The min-width
and max-width
properties should be used together to define a range of value for the element to resize to given the user's conditions (eg. monitor size). Explicitly giving the same element a width
simply defeats this purpose.
See http://reference.sitepoint.com/css/min-width for more information
If you want a resizable textarea
that grows with the amount of content the user adds you can have a look at this jQuery plugin: http://james.padolsey.com/javascript/jquery-plugin-autoresize/
Thanks for Yi Jiang!
jqueryui.com/demos/resizable/#textarea
is the answer!