Reputation: 644
Hi How to reduce the height of the textbox...
HTML CODE:
<textarea id="" name="" placeholder=""></textarea>
Upvotes: 0
Views: 1310
Reputation: 2529
By using CSS you can adjust the height of <textarea>
First, put some name on your id
<textarea id="box" name="" placeholder=""></textarea>
Then, your desired height in px
#box {
height:10px; /* example */
}
See here.
Upvotes: 0
Reputation:
For textarea use rows
"or and" cols
and set the value that you want,
for normal textbox you can set a style for it as style="height:20px;"
Upvotes: 0
Reputation: 50643
Using rows
attribute you can change the number of lines in your textarea, not exactly the height property (that is specified in pixels), but I think rows
is what you want. Example with 20 lines of height:
<textarea id="" rows="20" name="" placeholder=""></textarea>
In the same manner there's a cols
attribute to specify the width of the textarea in characters.
Upvotes: 0