Skip to content

Instantly share code, notes, and snippets.

@bulbul84
Created March 27, 2016 10:08
Show Gist options
  • Save bulbul84/8286cf78dee9d9f9ce9a to your computer and use it in GitHub Desktop.
Save bulbul84/8286cf78dee9d9f9ce9a to your computer and use it in GitHub Desktop.
How to Changes HTML Input Placeholder text color
::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: #909;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #909;
opacity: 1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #909;
opacity: 1;
}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: #909;
}
:placeholder-shown { /* Standard (https://drafts.csswg.org/selectors-4/#placeholder) */
color: #909;
}
/*--- Start Placeholder Color Changes -----*/
.form-group input::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: #777;
}
.form-group input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #777;
opacity: 1;
}
.form-group input::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #777;
opacity: 1;
}
.form-group input:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: #777;
}
.form-group input:placeholder-shown { /* Standard (https://drafts.csswg.org/selectors-4/#placeholder) */
color: #777;
}
/*---- /Start Placeholder Color Changes -----*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment