Jedi ThePro
Jedi ThePro

Reputation: 89

How do I adjust the height of the input in HTML?

I tried many times that google give me answers, but, It not working... Someone help?

I tried: <input type="text" height="10"> <input type="text" style="min-height: 10px;">

Upvotes: 0

Views: 77

Answers (4)

Jui
Jui

Reputation: 55

Try This

<input type="text" style="height:10px;">

Upvotes: 1

Prabesh Gouli
Prabesh Gouli

Reputation: 423

It is not height its size. If you want in the way you questioned.Something like this help

<input type="text" size="10">

<input type="text" size="10px">

Upvotes: 0

fedesc
fedesc

Reputation: 2610

This code you wrote <input type="text" style="min-height: 10px;"> - does work actually. it just won't go to min-height you stated because inside the font for the text is bigger. If you maintain the font correlated with the input height it will work.

This example works if you make the font size smaller.

<input type="text" style="min-height: 5px; font-size: 4px;">

Upvotes: 0

Ferin Patel
Ferin Patel

Reputation: 3968

use this style to height the input element

input {
  height:50px;
}
<input type="text" placeholder="Enter Text Here"/>

Upvotes: 2

Related Questions