Solved

Alternating gray background in <Select> list

Posted on 2014-10-17
1
89 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Button Css BootStrap 2 36
Apply tab index in forms 6 36
To remove highlight from a "a href" 5 23
Objects on Same Line 2 18
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now