I dont know whether its my mistake or Firefox bug. I have a text box in which the value is dynamically generated through python.
The value in the text box should be in the middle of the text box.
It works in IE and Chrome, but in Firefox it doesn't work.
Here is the CSS:
#query
{
margin: 0px;
padding: 0px;
width: 465px;
vertical-align: middle;
height: 45px;
font-weight: bold;
font-size: 16px;
line-height: 45px;
color: #aaaaaa;
padding-left: 10p开发者_Go百科x;
display: block;
}
I don't know your html but your code renders the input visually ok - only the cursor is rendered badly. IE8 renders it as it should, firefox stretches the cursor from bottom to top, but once you start writing it will go back to normal. In chrome the cursor renders from top to baseline.
Other that that it looks ok. If you are really having issues you could change the line-height to padding
height:29px
padding:8px 10px;
I think vertical-align: middle Does not work in firefox ... people has some problems with it. Should try different approach.
精彩评论