Bug 26355

Summary: with insufficient room for padding, button label is not centered
Product: WebKit Reporter: Jungshik Shin <jshin>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Windows XP   
Attachments:
Description Flags
test none

Description Jungshik Shin 2009-06-12 14:29:39 PDT
<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 Jungshik Shin 2009-06-12 14:33:49 PDT
Created attachment 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