Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,729 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!