[whatwg] Alignment of empty buttons

Boris Zbarsky bzbarsky at MIT.EDU
Thu Apr 25 10:48:12 PDT 2013

On 4/25/13 1:43 PM, Christian Biesinger wrote:
> Where should the button be positioned relative to the input field (or
> if you prefer, the baseline of the block)?

The question you are really asking is "where is the baseline of the 
button?", right?

> Chrome dev, IE and Opera
> put the bottom of the button a bit higher than the bottom of the
> input, whereas Firefox seems to approximately center the button on the
> line (though without using vertical-align:middle).

Gecko puts the baseline of the button at the baseline of the button's 
text, and if the button is not auto-height the extra height is added (or 
removed) equally from above and below the text.

It looks like Chrome dev does the same unless there's no text in the 
button, in which case they put the baseline at the bottom margin edge 
(more inline-block-like behavior?).


More information about the whatwg mailing list