Bug 26355 - with insufficient room for padding, button label is not centered
: with insufficient room for padding, button label is not centered
Status: NEW
: WebKit
CSS
: 528+ (Nightly build)
: All Windows XP
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-06-12 14:29 PST by
Modified: 2009-06-12 14:33 PST (History)


Attachments
test (323 bytes, text/html)
2009-06-12 14:33 PST, Jungshik Shin
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-06-12 14:29:39 PST
<input type=button style="width:25px; font-size: 18px" value="A"></input>
<input type=button style="width:25px; font-size: 18px; padding: 0px;" value="A"></input>


On Mac OS X, two buttons above are rendered identically. In both cases, 'A' is centered in the button. 

On Windows (Safari 4 and Chrome), 'A' is not centered but shifted to the right in the first button as if left-padding is applied first without considering whether there's enough room for 'right-padding. 

The UA stylesheet for input button has 'padding-left' and 'padding-right' set to 6px.
------- Comment #1 From 2009-06-12 14:33:49 PST -------
Created an attachment (id=31213) [details]
test

the first button : width: 25px, font-size:18px
the 2nd button: width: 25px, font-size:18px, padding:0
the 3rd button : width:40px, font-size: 18px