Home Change an HTML5 input's placeholder color with CSS
Reply: 0

Change an HTML5 input's placeholder color with CSS

user834
1#
user834 Published in June 23, 2018, 4:26 am

Chrome supports the placeholder attribute on input[type=text] elements (others probably do too).

But the following CSS doesn't do anything to the placeholder's value:

input[placeholder], [placeholder], *[placeholder] {
    color: red !important;
}
<input type="text" placeholder="Value">

Value will still remain grey instead of red.

Is there a way to change the color of the placeholder text?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.806226 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO