# Change color on different values

**URL:** <https://www.phphelp.com/t/change-color-on-different-values/31399>\
**Category:** HTML & CSS\
**Created:** [March 27, 2020, 7:43pm UTC](https://www.phphelp.com/t/change-color-on-different-values/31399 "2020-03-27T19:43:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![533578](https://www.phphelp.com/letter_avatar_proxy/v4/letter/5/8baadc/32.png) [@533578](https://www.phphelp.com/u/533578)\
**Post date:** [March 27, 2020, 7:43pm UTC](https://www.phphelp.com/t/change-color-on-different-values/31399/1 "2020-03-27T19:43:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![frankbeen](https://www.phphelp.com/letter_avatar_proxy/v4/letter/f/f1d935/32.png) [@frankbeen](https://www.phphelp.com/u/frankbeen)\
**Post date:** [March 27, 2020, 10:44pm UTC](https://www.phphelp.com/t/change-color-on-different-values/31399/2 "2020-03-27T22:44:13Z")

</div>

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.
