Position of text in a submit button

前端 未结 11 1510
灰色年华
灰色年华 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:33

    I had been facing a similar problem when using CSS inside buttons. The text was offset by 1 pixel in firefox, and rest of the browsers it was just fine. I used "padding" property specific to Firefox, in the following way

    The original code in which the input button's text was one pixel lower in Firefox

    .mybutton { 
        height:32px; background-color:green; 
        font-size:14px; color:white; font-weight:bold; 
        border:0px; -moz-border-radius:16px; border-radius:16px;
    }
    

    and after adding the Firefox specific padding after the above css, it was perfect in Firefox

    @-moz-document url-prefix() {
        .mybutton { padding-bottom:1px; }
    }
    

    In your case, may be you need a bit more padding-bottom, and probably padding-top in negative too (-1px or -2px).

提交回复
热议问题