possible to set different background color for each option?

24 views
Skip to first unread message

ssu...@gmail.com

unread,
Feb 19, 2017, 2:31:37 PM2/19/17
to select2
Hi I was wondering if using select2 I can set a different color for each row of the dropdown, using something like this:

<select>
<option value="first" style="background-color:#f7f7f7">first</option>
<option value="second" style="background-color:#f2f2f2">second</option>
<option value="third" style="background-color:#f5fbff">third</option>
<option value="fourth" style="background-color:#f7fffe">fourth</option>
<option value="fifth" style="background-color:#f4fff8">fifth</option>
</select>

The above does not work, but how could I make something like that work, is it possible?

Reply all
Reply to author
Forward
0 new messages