Hi,
For testing I added a custom class ‘dropdown-stage’ to the dropdown. it’s possible to style the options by addressing them like this:
.dropdown-stage {
option:nth-child(2) {
background-color: red;
}
option:nth-child(3) {
background-color: yellow;
}
option:nth-child(4) {
background-color: green;
}
}
More about styling in general here: https://docs.mendix.com/howto/front-end/customize-styling-new/
Hi Furkan,
You can do that with “Dynamic Classes” in properties. I'm leaving a link here. Hopefully, it helps you.
https://docs.mendix.com/refguide/common-widget-properties/#dynamicclasses
Kind regards,
Halil Kanat
Hi Furkan,
you need to add the Lukas code in the dropdown css file. create 1 seperate sub class for that and add the code otherwise the entire dropdown has reflect this code.
Furkan,
I don’t think it is possible via styling or appearance configuration.
There are methods which consumes more time though; such as implementing a ‘OnClick’ nanoflow and then call a Javascript action which changes the background of this particular drop down.
thanks