Linked Questions

Popular Questions

Set font color for select option placeholder

Asked by At

Looking for a way to set the font color of a dropdown list placeholder. The following worked when the select id was required:

select:required:invalid {
    color: #9e9e9e;
}

However, I do not want these dropdown lists to be required for input. Once I remove the required tag, the placeholder font changes back to black.

The following is my dropdown list:

<select id="searchresults4" name="primarysport">
    <option value="">Choose Primary Sport...</option>
    <option>Football</option>
    <option>Basketball</option>
    <option>Baseball</option>
    <option>Softball</option>
    <option>Soccer</option>
    <option>Golf</option>
</select>

Thanks for your help

Related Questions