Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't reduce size of resizable textarea in Chrome

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?

like image 279
Sergei Basharov Avatar asked Apr 27 '12 19:04

Sergei Basharov


People also ask

How do I not resize textarea?

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.

How do I Auto Resize textarea?

# 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.

How do I turn off resizable?

To disable resizable property of an element use resize to none. It is the default value.

How do I stop web pages from resizing?

Specifying a min-width to your <body> element will prevent auto-resizing.


1 Answers

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

like image 150
KittenCodings Avatar answered Sep 29 '22 14:09

KittenCodings