change color of the dropdown field options

  • RT
    Asked on June 18, 2019 at 11:51 AM

    I want to change the color of the dropdown menu field, to match the color of the option chosen in the options list. Do you have any idea how to do this? I'm clueless!

  • Richie JotForm Support
    Replied on June 18, 2019 at 1:45 PM

    We can change the colors of the dropdown option by using custom CSS and nth:child selector.

    Here is a sample CSS:

    option:nth-child(2) {

     background: red;

    }
    option:nth-child(3) {

     background: blue;

    }
    option:nth-child(4) {

     background: green;

    }
    option:nth-child(5) {

    background: yellow;

    }

    Guide:https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    Screenshot:

    change color of the dropdown field options Image 1 Screenshot 20

    Sample Form:https://form.jotform.com/91685375251968

    Please give it a try and let us know if you need further assistance.