In a form, I have two different dropdown menus (one required and one not required).
The required dropdown select has lightgrey placeholder text color whereas the regular dropdown select has black placeholder text color.
I want to override the black placeholder color to match the lightgrey. I cannot seem to override it with !important
in CSS
select option:disabled {
color: lighgrey !important;
}
This doesn't work and I'm not sure what works
place the color on select
select:disabled { color: lightgrey;important; }
<select disabled> <option>black</option> <option>green</option> </select>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.