Placeholder CSS when disabled
css, forms, placeholder
Solution
You can style placeholder pseudo-elements in css, so you could write the following css:
input:disabled::-webkit-input-placeholder { /* WebKit browsers */
color: #fff;
}
input:disabled:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #fff;
}
input:disabled::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #fff;
}
input:disabled:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #fff;
}
assuming that white is also inputs background.
Problem
Been searching all over and can't seem to find the answer to this: I have a checkbox that disables several forms if unchecked. The forms are styled to change color, but the placeholder text remains the same. How can I fix this? (alternatively, I wouldn't mind even just removing all placeholder text) Thanks!