Position of text in a submit button

前端 未结 11 1490
灰色年华
灰色年华 2020-12-25 15:00

The position of the text on the search submit button on my blog is very low in Firefox 4, but not Chrome 10 or IE9. I\'ve tried almost everything, and nothing works except l

11条回答
  •  伪装坚强ぢ
    2020-12-25 15:34

    I have found that a combination of padding and line-height does the trick. As stated Firefox ignores line-height.

    1. Make sure you set a larger bottom padding than top padding. Fiddle around with it a bit and you will be able to vertically align the text in Firefox.
    2. You will then see that this pushes the text too close to the top of the element in Webkit. Now use a large line-height to align it properly in Webkit and voila!

    I have tested this on a Windows 7 machine running Firefox 7, Chrome 16, Safari 5.1 and IE9.

提交回复
热议问题