Captain Otter
Captain Otter

Reputation: 43

how to make user's input begin at the top and wrap inside the field (this is an html form)

This is the current look of my input field:

Sreenshot
Screenshot 2

If I begin to type, my text is right in the middle of the box and continues to go to the right forever. I want to make it stop overflowing and do down to a new line each time it reaches the maximum width I have set, and have the text start from the top instead of the middle. I would like to look like word wrap.

Just to mention: I have multiple input type="text" fields, so for this one, in particular, I am using its id="description" and #description respectively.

Upvotes: 1

Views: 512

Answers (2)

user6690322
user6690322

Reputation:

Instead of using <input type="text">, use <textarea>. It solves your problem. <textarea> is the best solution for this. Visit this link for more info. textarea

Upvotes: 0

Paweł Cebulski
Paweł Cebulski

Reputation: 86

Use <textarea> tag:

<textarea id="description" rows="1" cols="50"></textarea>

Upvotes: 3

Related Questions