input type=submit text vertical alignment in Firefox

后端 未结 5 554
故里飘歌
故里飘歌 2020-12-04 07:46

I\'m trying to style my form buttons and I\'m experiencing a problem in Firefox that I can\'t get to the bottom of...

I want to style certain

5条回答
  •  甜味超标
    2020-12-04 08:15

    Inputs are formatted not following the W3 box model convention in different browsers, you might want to include:

    input /*Content follows box model*/
    { 
        -moz-box-sizing: content-box;
        -webkit-box-sizing: content-box;
        box-sizing: content-box;
    
        height:24px;
    }
    

    Also include for firefox (which Shelly pointed out):

    input::-moz-focus-inner /*Remove button padding in FF*/
    { 
        border: 0;
        padding: 0;
    }
    

    Otherwise you could use button

    I collected all these solutions from various sources, they deserve the credit

提交回复
热议问题