This page tries to list issues with current web browsers when applying or
resetting basic styles of button
elements (and
input
elements with button
or submit
type).
Span (inline-block)
button, input {
margin: 0;
padding: 0;
border: none;
font: inherit;
line-height: normal;
}
text-align:left
). No idea how to fix this.*::-moz-focus-inner {border:none;padding:0}
but you lose the focus styles…
line-height
Expected result: buttons should be 50px high.
Span (inline-block)
button, input {
margin: 0;
padding: 0;
border: none;
font: inherit;
line-height: 50px;
}
*::-moz-focus-inner {border:none;padding:0}
input
elements cannot be controled
(in Firefox, resource://gre-resources/forms.css
defines
input {line-height: normal !important;}
).line-height
+ padding
Expected result: buttons should be 70px high.
Span (inline-block)
button, input {
margin: 0;
padding: 10px;
border: none;
font: inherit;
line-height: 50px;
}
height
Expected result: buttons should be 50px high.
Span (inline-block)
button, input {
height: 50px;
margin: 0;
padding: 0;
border: none;
font: inherit;
}
height
+ padding
+ border
Expected result: buttons should be 50px high.
Span (inline-block)
button, input {
height: 50px;
margin: 0;
padding: 10px;
border: solid 5px black;
font: inherit;
}
height
+ … + box-sizing
Expected result: buttons should be 80px high.
Span (inline-block)
button, input {
height: 50px;
margin: 0;
padding: 10px;
border: solid 5px black;
font: inherit;
box-sizing: content-box;
}
box-sizing
in IE7 so the box ends up at 50px.