Solved

Alternating gray background in <Select> list

Posted on 2014-10-17
1
90 Views
Last Modified: 2014-10-17
Is there a way to cause the individual options in a select list to alternate from a gray background to white? Is it just a matter of styling the background color on the option tag?

Like <option style="background-color:#DDDBDB;" value=.............>

#DDDBDB is just an example of a light gray.
0
Comment
Question by:Richard Korts
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40387322
select option:nth-child(odd){
    background:gray
}

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question