I want to apply styles to select input elements only if they have an option:checked. It seems to me that this isn't possible using css only. (I am aware that there's no parent selector)
select:pseudo-class-here {
background-color:red;
}
I want to apply styles to select input elements only if they have an option:checked. It seems to me that this isn't possible using css only. (I am aware that there's no parent selector)
select:pseudo-class-here {
background-color:red;
}
No there is no such pseudo-class. Could be because a regular select element always has an option selected. This is not the case on select multiple elements.