I’m working on a contact form and having trouble changing the placeholder text color. The placeholders like “Your Name” and “Email Address” appear in white text, but I can’t figure out what CSS is controlling this color.
When I use developer tools to inspect the form fields, I can see the styling for the input elements themselves, but the placeholder text color doesn’t show up in the computed styles. Here’s what I currently have:
.contact-form form input[type=text],
.contact-form form input[type=email],
.contact-form form input[type=phone],
.contact-form form select,
.contact-form form textarea {
background: rgba(0,0,0,0);
border: none;
border-bottom: 2px solid rgba(255,255,255,0.2);
color: #ffffff;
font-family: Arial, sans-serif;
font-size: 16px;
margin-bottom: 15px;
padding-bottom: 10px;
width: 100%;
}
When I try to change the color property, it only affects some placeholders like dropdown options but not the text input placeholders. I’ve tried using !important but it doesn’t work for all fields.
Any suggestions on what CSS selectors I should target to change the placeholder text color across all form fields?