Reputation: 491
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.
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
Reputation: 4721
I would suggest use padding instead of line-height.
input {
width:200px;
height:20px;
padding:10px 5px;
}
Upvotes: 2