Why do text inputs have extra padding?
I'm trying to overlay text on an <input type="text"> (for cross-browser
placeholder support). I've found that my positioning is always off by a
couple of pixels, because of some kind of padding which can't be removed
by setting padding: 0;. The suggestions here and here do not solve the
problem.
You can see this padding in the following screenshot from Chrome, as the
white space between the blue highlight and the yellow border:
How can I a) remove this space; or b) measure it using Javascript?
No comments:
Post a Comment