I want to give the yellow color to the selected items in multiselect dropdown box. By default, it has gray background after selecting,
How to do this in HTML
, CSS
.
This question is about multiselect but for single select refer (Related but not duplicate of either): How to apply background-color to a selected option?
We can simply do with the help of the below CSS:
select option:checked{
background: #1aab8e -webkit-linear-gradient(bottom, #1aab8e 0%, #1aab8e 100%);
}