Buttons with an image don't align with text ones

Sometimes you might want to mix text buttons with image buttons and insist on using the button tag. However, Firefox aligns the text buttons lower then the image buttons.

Test page Workaround is not included
Reported by: Laurens van der Klis.

Mozilla, Opera, Safari | Reported on 5 September 2007.

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.




Search reports by browser:

Atom RSS

Comments

(Add your own)

1 Posted by Martijn on 6 September 2007 | Permalink

I filed this as https://bugzilla.mozilla.org/show_bug.cgi?id=395116
Normally, if you want to see this kind of thing fixed in Mozilla, then you should file a bug on it.

2 Posted by Merri on 6 September 2007 | Permalink

Have you checked vertical-align? I see this kind of problems occur when there is a different alignment set between the buttons.

And yes, due to long work day I'm too lazy to start checking this myself (especially as I rarely have had a need for image buttons).

3 Posted by AntonN on 10 September 2007 | Permalink

If you add vertical-align property to (middle|top|bottom) to button{} element - all buttons align properly.

4 Posted by Adam on 10 March 2008 | Permalink

Alternatively, you can use:

img.yourButtonClass {vertical-align:text-bottom;}

This is slightly better since it is likely to cause alignment issues in other browsers.

5 Posted by Hans Schmidt on 20 March 2008 | Permalink

button {
vertical-align: bottom;
...
}
... solves that problem .

Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes