Bug 26355 - with insufficient room for padding, button label is not centered
Summary: with insufficient room for padding, button label is not centered
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-12 14:29 PDT by Jungshik Shin
Modified: 2009-06-12 14:33 PDT (History)
0 users

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
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