开发者

Why does Firefox have a 3px wide border on input[type=submit]?

开发者 https://www.devze.com 2023-01-19 19:18 出处:网络
All my submit buttons have different size and it looks really weird. At least I want them to have the same height. Look at the pictures below.

All my submit buttons have different size and it looks really weird. At least I want them to have the same height. Look at the pictures below.

Firefox:

Why does Firefox have a 3px wide border on input[type=submit]?

IE7:

开发者_Python百科

Why does Firefox have a 3px wide border on input[type=submit]?

Chrome & IE8 (how i want it):

Why does Firefox have a 3px wide border on input[type=submit]?

My CSS looks like this:

input, select, textarea {
 margin-bottom:3px;
}
input, select, button, textarea {
 font-family: Tahoma, Verdana, sans-serif, FreeSans;
 font-size:11px;
}
input[type=submit] {
 padding:1px 3px;
}

Anyone know how i can fix this?

UPDATE

Width problem fixed. Problem now: The height of the button in Firefox. Any tips?


You can get rid of the ridiculous left- and right-side padding in IE by adding:

width: auto; overflow: visible;

to the CSS for buttons, and for "submit" and "button" inputs. (Why? who knows?)

As to the height, you might experiment with setting "line-height". Be warned that "line-height" can make IE do bizarre things to buttons however.

0

精彩评论

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