How can I get rid of horizontal padding or indent in html5 search inputs in webkit?

Posted by Scott Vandehey on Stack Overflow See other posts from Stack Overflow or by Scott Vandehey
Published on 2012-06-20T20:44:05Z Indexed on 2012/06/20 21:16 UTC
Read the original article Hit count: 140

Filed under:
|
|
|
|

In webkit only, the text in a search input is indented from the left side. Here's a demo. Even after stripping all padding, text-indent, and setting -webkit-appearance to textfield or none, the text is still indented. It looks to be around 10px or so, but the inspector doesn't show any CSS rules (even browser defaults) that seem to apply this style. Any ideas?

<input type="search" value="Search">

-webkit-appearance: textfield;
border: 1px solid #ccc;
padding: 0;
margin: 0;
text-indent: 0;

© Stack Overflow or respective owner

Related posts about css

Related posts about html5