The issue I'm facing is specific to input[type="text"]
elements in Webkit. No matter what adjustments I make, it seems like there is an additional padding: 1px 0 0 1px
(top and left only) applied to the element.
A similar anomaly occurs in Gecko as well - input[type="text"]
receives an extra padding: 1px 0 0 1px
, while input[type="button"]
has an unusual padding: 1px 0 0 0
.
You can explore all my attempted solutions in this JSFiddle link without success so far: http://jsfiddle.net/PncMR/10/
Interestingly, when setting the line-height of all elements to 0
(as seen here: http://jsfiddle.net/PncMR/11/), the only elements unaffected by this adjustment are those experiencing issues. This leads me to believe that the browser defaults to a specific line-height, prompting me to search for a way to override it.
Despite scouring through the webkit base styles, I have yet to identify any factors causing this behavior. Feel free to investigate yourself:
This issue cannot be attributed to moz-focus-inner
, appearance: none
, box-sizing
, or outline
. Regrettably, I have not found alternative solutions thus far.
Edit: While I have addressed the vertical padding concerns in my response below, I am still on the lookout for a resolution regarding the excess padding-left: 1px
exclusively present in text-inputs within Webkit and Gecko browsers. (See http://jsfiddle.net/PncMR/14/)