Ask A Question


You’re not receiving notifications from this thread.

How do I style select options?

William Jones asked in General

I have options for a select field from 2 sources (this years options and last years options). In the drop down list I would like to distinguish the options between the sources (e.g. this years options with a green background, last years with a pink background).


I think you have to use a Javascript library to create a custom select box like that. The browser's select box does not allow you to do that.

For example, something like this provides a ton of flexibilty: or



Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.