"Input Submit" Cross-browser compatibility
<input type="submit" value="Share" />
In Chrome/Safari:
http://img514.imageshack.us/img514/619/btnwebkit.pngIn FF:
http://img220.imageshack.us/img220/347开发者_运维百科/btnff.pngCan someone please tell me why they don't look the same?
Even, when I set the font-size, font-family, padding and margin, the button in FF will always look bigger than the one in Chrome/Safari.
This is because default styles on HTML elements like input buttons and H1 and UL and LI and so forth are subject to the browser developer's whim. You can minimize the disruption by using a reset stylesheet. That said, you may get better results by using <button type="submit" value="Share">Share</button>
instead of an input (with a type of button), and setting the styles on that.
精彩评论