14

In another question I asked about alignment this was given to me to answer the question about firefox being a twit. It worked but it has left a sour taste in my mouth and I'll explain why.

button::-moz-focus-inner { 
  border: 0;
  padding: 0;
}

Opera (10 for this example), Firefox (3 for this example) and Internet Explorer (7 for this example) all display an input[type="submit"] button differently. This focus-inner property is default 0 on Opera 10, something like 5px for firefox and must be 6px for Internet explorer.

How can I "blanket" reset them all to 0? Is there an standard CSS call that will not only do the above but will set this hidden property for IE too?

3
  • 3
    I doubt that MSIE and Opera know how to render -moz-something properties :)
    – n1313
    Sep 16, 2009 at 14:46
  • n1313, that isn't the question really. The question is that submit buttons are used by all browsers. They all seems to set this value internally and I want to know 1) WHY!?!?!?!? 2) an easy way to change them all in one fell swoop.
    – Dorjan
    Sep 16, 2009 at 14:50
  • 2014 and this thing still happens... not only that but it doesn't really help you out if the button has a height defined on it... Apr 11, 2014 at 12:10

1 Answer 1

6

The reason why this is happening is simple: because all these browsers are made by different people. Try looking at your buttons from Safari, for example. There is no such thing as one css rule that will force all buttons in all major browsers look the same.

Well, actually you can achieve pixel-perfection, if you treat every one of them personally, like this. And you can always use <input type="image">, that will do the trick for sure.

4
  • the type=image would prevent the submit action of a form without javascript though right?
    – Dorjan
    Sep 16, 2009 at 15:12
  • 1
    also, yes I understand they are made by different people but surely they can open up the design (like firefox has attempted to do) so others can "fix" it their way?
    – Dorjan
    Sep 16, 2009 at 15:14
  • 4
    No, type=image is an equivalent to type=submit. You can click on it and the form will be submitted.
    – n1313
    Sep 16, 2009 at 17:02
  • Well what I wanted can't be had so I'll take this as a possible alt. Thanks n1313
    – Dorjan
    Sep 22, 2009 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.