I’m trying to put an icon inside a button element and I’m getting strange positioning but in Firefox 4. Check out this demo http://jsfiddle.net/j6q2e/3/
It works as expected in Chrome and IE but in Firefox the icon is completely off the reservation. Is that a known bug? Is there a way to fix that?
(I don’t want to use <a> because it’s a submit button for a form and I want to keep it that way. I also would like to avoid using background-image style because the icon is in a CSS sprite image and to use as background-image I’d have to save it as a separate PNG.)
Just a quick update to get this thing “answered”…
So yeah, this is a bug in Firefox, and still is as of version 5. Chrome, IE9 and Opera all correctly position the icon inside the button.
There is another SO thread dealing with it and here’s the Mozilla bug.