Arul
Arul

Reputation: 491

input box line-height issue in chrome?

I set height:40px and line-height:40px to a input field. It working in all browsers except chrome.

IE7 and IE8 not working properly with out line-height property. So I set this property.

Refer below image.

enter image description here

HTML:

Login :
<input type="text" class="inputtxt" />

CSS:

.inputtxt {
    height:40px;
    width:200px;
    line-height:40px;
}

in Fiddle : http://jsfiddle.net/8DF7G/2/

Upvotes: 1

Views: 2270

Answers (1)

Ravi Hamsa
Ravi Hamsa

Reputation: 4721

I would suggest use padding instead of line-height.

input {
    width:200px;
    height:20px;
    padding:10px 5px;
}

Upvotes: 2

Related Questions