Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Form Basics The Textarea Element

SAMUEL LAWRENCE
PLUS
SAMUEL LAWRENCE
Courses Plus Student 8,447 Points

How to keep the user from resizing the text area?

Hi while I understand Nick's point about giving the user the option to resize the textarea, I personally think it looks a bit untidy when the text area is stretched outside the area of the <form> Background. How can I make it so the text area can only be resized up or down, the height, not the width?

4 Answers

Andrew McCormick
Andrew McCormick
17,730 Points
textarea {
resize: none;
}

Alfonso Montano , I don't believe that "resizable" is a valid property.

Hi, You may use this style to fix width

  textarea {
      max-width: 200px;
      min-width: 200px;
  }
SAMUEL LAWRENCE
PLUS
SAMUEL LAWRENCE
Courses Plus Student 8,447 Points

Thanks andrew. I followed the link below that has the detailed different properties of the textarea that Nick suggested and found a whole bunch. You're right, resizable isn't a valid property. Thanks again for your quick responses guys. Love the treehouse community.

SAMUEL LAWRENCE
PLUS
SAMUEL LAWRENCE
Courses Plus Student 8,447 Points

Hi Maxim, Thanks a lot man for this added information helped a lot. Props man!