Change color on different values

I have made an

<option>

where I would like to adjust the css with different values, when the value is: Betaald, I want the css to make it green. When The value is Niet betaald. I want to make it red. How can I do that?

Dropdowns are part of the Operating system and thus cannot really be styled through CSS, However in some browsers there are a few possibilities, but that is not really helpfull if you wish to show something that looks the same in every browser.

That said there are some HTML/CSS libraries or plugins that act as a dropdown bur are actually rendered with normal HTML elements like DIVs, Those elements can be styled like any other HTML element.

Sponsor our Newsletter | Privacy Policy | Terms of Service