views:

1809

answers:

1
+2  Q: 

-moz-focus-inner

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?

many thanks in advance.

+1  A: 

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.

n1313
the type=image would prevent the submit action of a form without javascript though right?
Dorjan
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
No, type=image is an equivalent to type=submit. You can click on it and the form will be submitted.
n1313
Well what I wanted can't be had so I'll take this as a possible alt.Thanks n1313
Dorjan