W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2013

Re: [whatwg] Alignment of empty buttons

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 25 Apr 2013 13:48:12 -0400
Message-ID: <51796C5C.7050806@mit.edu>
To: whatwg@lists.whatwg.org
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?).

-Boris
Received on Thursday, 25 April 2013 17:48:43 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:57 UTC