Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a fixed size twitter bootstrap text area [closed]

I want to create a fixed sized text area which cannot be dragged to change the size. How can I make a text area fixed size in Twitter Bootstrap. How can its size be fixed? By fixed size I mean fixed number of cols and rows.

I went through the documentation but didn't get any clue.

like image 895
Saurabh Kumar Avatar asked Mar 06 '13 13:03

Saurabh Kumar


People also ask

How do you make a fixed size text area?

Definition and Usage The <textarea> element is often used in a form, to collect user inputs like comments or reviews. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). The size of a text area is specified by the cols and rows attributes (or with CSS).

How make textarea responsive CSS?

Try textarea {max-width:95%;} - it will always fit your display. Show activity on this post. I set the number of columns to slightly greater that the width of the div on a large screen and as the screen gets smaller it acts responsive to the screen size.

How do I Auto Expand textarea?

It can be achieved by using JavaScript and jQuery. Method 1: Using JavaScript: To change the height, a new function is created which changes the style property of the textarea. The height of the textarea is first set to auto. This value makes the browser set the height of an element automatically.


1 Answers

Add this to your CSS:

textarea { resize:none; } 

or this for fixed width (and keep vertical resizing):

textarea { resize:vertical; } 

Note that this is not supported by opera and internet explorer.

like image 67
Oliver Avatar answered Sep 28 '22 23:09

Oliver