Changing an input’s HTML5 placeholder color with CSS does not work on Chrome

You forget a :.
Because of that, the whole selector got corrupted and didn’t work.
http://jsfiddle.net/a96f6/87/

Edit:
Seems like (after an update?) this doesn’t work anymore, try this:

input::-webkit-input-placeholder{
    color:red;
}
input:-moz-placeholder {
    color:red;
}

Note: don’t mix the vendor prefix selectors (-moz, -webkit, -ms, …). Chrome for example won’t understand “-moz-” and then ignores the whole selector.

Edit for clarification:
To make it work in all browsers, use this code:

::-webkit-input-placeholder {
    color:red;
}

::-moz-placeholder {
    color:red;
}

::-ms-placeholder {
    color:red;
}

::placeholder {
    color:red;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)