I have the following HTML code:
<style type="text/css"> .submitbutton{margin-left:-2px;padding:1px} </style> ... <form> ... <input class=submitbutton type=submit value="Create Listings" /> </form>
In Firefox, the input button has more padding than in Chrome.
Any ideas why?
UPDATE: If you're wondering why I have the negative margin - it's because between the input field and the input button - there is too much space.
CSS can be used to make buttons the same height by using the CSS property “height”. By setting the height of the button to a specific value, all buttons will be that height.
/* Remove button padding in FF */ button::-moz-focus-inner { border:0; padding:0; }
You'll get the same button appearance in Chrome and Firefox.
Even though you as a developer test in different browsers and see the difference in buttons, the user will not. It's too easy to get focused on things that users won't notice: the user likely has either Firefox or else IE or else Chrome, but not all of them. Rarely do users ever switch browsers over time let alone switch between them and complain about a few pixels diff.
So if you consider the buttons and the experience in just one browser at a time, and if it works well in that experience/browser, then don't bother spending more time. Instead move onto next steps.
This doesn't answer 'why' but somebody else explained that one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With