HTML5 placeholder css padding HTML5 placeholder css padding google-chrome google-chrome

HTML5 placeholder css padding


I got the same issue.

I fixed it by removing line-height from my input. Check if there is some lineheight which is causing the problem


I had similar issue, my problem was with the side padding, and the solution was with, text-indent, I wasn't realize that text indent effect the placeholder side position.

input{  text-indent: 10px;}


If you want to keep your line-height and force the placeholder to have the same, you can directly edit the placeholder CSS since the newer browser versions. That did the trick for me:

input::-webkit-input-placeholder { /* WebKit browsers */  line-height: 1.5em;}input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */  line-height: 1.5em;}input::-moz-placeholder { /* Mozilla Firefox 19+ */  line-height: 1.5em;}input:-ms-input-placeholder { /* Internet Explorer 10+ */  line-height: 1.5em;}