I am having trouble vertical aligning text in an input field in Internet Explorer.
I have:
input#search {
float:left;
font-size:11px;
height:20px;
margin:0;
padding-left:4px;
width:100px;
}
In Firefox and Chrome, it seems to be automatically vertical aligned, however in Internet Explorer it is not.
Just set the height and line-height for the input object and it works fine (ie 7+).
input { border: 0; font-size: 0.8em; height: 32px; line-height: 32px;}
gl Paulo Bueno
Just define line-height
and height
for a text box with same value. It will be taken care
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With