how to make the textarea's width fixed but keep the height flexible CSS


Tags: html,css,textarea

Problem :

how to make the textarea's width fixed but keep the height flexible CSS

so e.g. keep the default width of the textarea generated by the browser and disallow stretching to the right, but keep the height stretchable?

<textarea class="test"></textarea>

.test {
width:
height:}


Solution :

You can do with resize property value set to vertical

Check the browser compatibility table: Can I use resize

.test {
  resize: vertical;
  width: 100px;
}
<textarea class="test"></textarea>


    CSS Howto..

    How to remove css class with some effect using jQuery?

    How to implement small text list search functionality using CSS attribute selectors

    How to style for first class css

    How can I create a DIV that expands UP TO a height and then shows a scrollbar?

    CSS: How to make this topheader?

    How do I link JS file from other folder to a page?

    How can I achieve this Flash effect using jQuery?

    How to use absolute positioning without overlap effect

    how to set max size of a counter?

    css make img shown when hover a li

    How to adjust the height of a series of DIVs by CSS

    How Can I Override Style Info from a CSS Class in the Body of a Page?

    How to create a completely flexible piano keyboard with HTML and CSS

    How to display clicked on/off SVG icon from admin panel page and display result on a different page

    How to select multiple objects of a class for css manipulation

    How manage Divisions in browser resizing

    How to adjust the opacity of CSS background image instead of radio button with an icon overlay

    How does one load a CSS framework in Rails 3.1?

    How to make jQuery slide open and close with CSS class

    How to fill the width under an image with a caption without defining the width of the caption?

    How do I overwrite certain conditions when you have two CSS files?

    How is physical inch related to pixels in css given so many different resolutions?

    How to make box container expand when text-field does?

    How can I vertically align text within a span element, or make the span the same size as the text?

    HTML/CSS - How to set text (e.g. 'Quote of the Day') to change automatically on page load/reload?

    how do i change image width in jCarousel?

    How to override css attribute-only style

    How can I use webpack to copy files to the distribution folder?

    How to change a Pseudo-class style through JavaScript?

    How do you fade horizontal text into a vertical gradient?