How to change input placeholder color with CSS

Using the code block below, you can change the placeholder colors of all inputs on your website.


input::-moz-placeholder {
  color: #1d1c22;
  opacity: 1;
}
input:-ms-input-placeholder {
  color: #1d1c22;
}
input::-webkit-input-placeholder {
  color: #1d1c22;
}

Of course you can define and target specific classes like this:

.form-control::-moz-placeholder {
  color: #1d1c22;
  opacity: 1;
}
.form-control:-ms-input-placeholder {
  color: #1d1c22;
}
.form-control::-webkit-input-placeholder {
  color: #1d1c22;
}