Incorrect vertical alignment in IE8

前端 未结 2 1786
难免孤独
难免孤独 2021-02-02 07:41

The default text in my search box looks fine in Chrome, FF, and Safari (vertical-align: middle).

However, the default text rises to the top of the search box in

相关标签:
2条回答
  • 2021-02-02 08:31

    Have you tried setting the line height to match the height of the text box? The text should automatically appear in the middle of the line

    0 讨论(0)
  • 2021-02-02 08:32

    Specifying line-height causes the cursor to grow very tall in Chrome , i will suggest to use equal padding from top/bottom to vertically align text in IE8, it will work in Chrome/FF/IE8

    0 讨论(0)
提交回复
热议问题