After much frustration, I've realised that <input type="submit"/>
s have a border-box box model, whereas <input type="text"/>
has a content-box box model. This behavior is present in IE8 and FF. Unfortunately, this prevents me from applying this style for nice evenly sized inputs:
input, textarea
{
border: 5px solid #808080;
padding:0px;
background-color:#C0C0C0;
width:20em;
}
(the 5px border is just to emphasize the problem. It should just be 1px)
Is this correct behaviour by IE and FF?
And is there a cross-browser way around this problem?