jQuery UI Widgets Forums Lists DropDownList DropdownList background color for list items

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 6 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • reva
    Participant

    Hi,

    I am trying to set the background color differently for each element. I am unable to do it like this,

    <div class=”col-sm-10″>
    <select id=”pcolor” style=”width: auto”>
    <option value=”16775408″ style=”background-color: AliceBlue” >AliceBlue</option>
    <option value=”14150650″ style=”background-color: AntiqueWhite”>AntiqueWhite</option>
    <option value=”13959039″ style=”background-color: Aquamarine”>Aquamarine</option>
    <option value=”3329434″ style=”background-color: YellowGreen”>YellowGreen</option>
    </select>
    </div>

    But somehow the background color is not setting.If it is a jquery control is working fine.

    Thanks,
    Reva

    • This topic was modified 6 years, 12 months ago by  reva.

    Hristo
    Participant

    Hello Reva,

    I would suggest you look at this topic:
    http://www.jqwidgets.com/community/topic/color-rendering-of-dropdownlist-items-in-a-form/
    Another option is to use CSS to change the style and you can use our internal classes for the particular Widget.
    (eg. “jqx-listitem-state-normal”, “.jqx-listitem-element:first-child”, “.jqx-fill-state-normal” and etc)
    You could find more information in our Documentation.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.