开发者

Firefox adds 1px on my submit button

开发者 https://www.devze.com 2023-04-09 14:33 出处:网络
I\'m trying to design my form via CSS. Problem is that I need a \"standard\" submit and a hyperlink which is styled like a button with CSS.

I'm trying to design my form via CSS. Problem is that I need a "standard" submit and a hyperlink which is styled like a button with CSS.

My CSS currently looks like that:

    form .buttons input[type=submit], form .buttons a { padding: 0; margin: 0; } 
    form .buttons input[type=submit], form .buttons a { font-family: Tahoma, sans-serif; font-size: 14px; text-decoration: none; font-weight: bold; color: #565656; }
    form .buttons input[type=submit] { border: 1px solid black; }
    form .buttons a { border: 1px solid black; }

In Firefox I have the problem that there is a 1px padding added around the submit button (like you can see on the screenshot).

Firefox adds 1px on my submit button

Is there a solution how I can solve this 开发者_C百科problem?


input[type="submit"]::-moz-focus-inner { 
    border: 0px;
    padding: 0px;  
}


Try also "line-height: normal;" it fixed a bug in IE as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号