Is there a way to style the currently selected <option> element in a <select> element?
I could then give a background color to the currently selected option element? That way I can style the option that’s currently viewable in the closed dropdown.
Source: w3.org
So, this CSS works, although styling the
coloris not possible in every browser:An example of this in action, hiding the currently selected item from the drop down list.
To style the currently selected option in the closed dropdown as well, you could try reversing the logic: