Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

text box input height

Tags:

html

css

I made the size of the box bigger. it look bigger int the dream weaver design view but does not seem to work in the browsers.

<input type="text" **height="60%"**  name=" item" align="left" />
like image 913
user1785939 Avatar asked Oct 31 '12 18:10

user1785939


People also ask

How do you change input box height?

The height of a textbox of input tag can be increased by using its style property. In style, we have to give a property of height and after this we have to give a required value to its height attribute. So, that the height may increase according to your choice.

How do I make a text box bigger in HTML?

To create a multi-line text input, use the HTML <textarea> tag. You can set the size of a text area using the cols and rows attributes. It is used within a form, to allow users to input text over multiple rows.


2 Answers

If you want to increase the height of the input field, you can specify line-height css property for the input field.

input {
    line-height: 2em; // 2em is (2 * default line height)
}
like image 172
Prasanth Avatar answered Oct 27 '22 22:10

Prasanth


I came here looking for making an input that's actually multiple lines. Turns out I didn't want an input, I wanted a textarea. You can set height or line-height as other answers specify, but it'll still just be one line of a textbox. If you want actual multiple lines, use a textarea instead. The following is an example of a 3-row textarea with a width of 500px (should be a good part of the page, not necessary to set this and will have to change it based on your requirements).

<textarea name="roleExplanation" style="width: 500px" rows="3">This role is for facility managers and holds the highest permissions in the application.</textarea>
like image 23
Joey Cusimano Avatar answered Oct 27 '22 21:10

Joey Cusimano