The line-height property usually takes care of vertical alignment, but not with inputs. Is there a way to automatically center text without playing around with padding?
Try :
height: 21px;
line-height: 21px; /* FOR IE */
Because on some versions of IE (< 9) the property height is not properly interpreted.
In Opera 9.62, Mozilla 3.0.4, Safari 3.2 (for Windows) it helps, if you put some text or at least a whitespace within the same line as the input field.
<div style="line-height: 60px; height: 60px; border: 1px solid black;">
<input type="text" value="foo" />
</div>
(imagine an   after the input-statement)
IE 7 ignores every CSS hack I tried. I would recommend using padding for IE only. Should make it easier for you to position it correctly if it only has to work within one specific browser.
I've not tried this myself, but try setting:
height : 36px; //for other browsers
line-height: 36px; // for IE
Where 36px is the height of your input.
input[type=text]
{
height: 15px;
line-height: 15px;
}
this is correct way to set vertical-middle position.
I was just working on this within MaterialUI's text inputs. Adding padding-top: 0.5rem to the input style worked for me. While this was adjusting the padding, at least you don't need to worry about adjusting for updates, much less different breakpoints.
Just don't set the height of the input box, only set the font-size, that will be ok