I\'m trying to set the style of an option in a select dropdown menu in Google Chrome. It works in all browsers except IE9 and Chrome.
I actually discovered something recently that seems to work for styling individual elements within Chrome, Firefox, and IE using pure CSS.
Maybe, try the following:
HTML:
CSS:
select {
background-color:#000;
color: #FFF;
}
select * {
background-color:#000;
color:#FFF;
}
select *.red { /* This, miraculously, styles the '' elements. */
background-color:#F00;
color:#FFF;
}
select *.white {
background-color:#FFF;
color:#000;
}
select *.blue {
background-color:#06F;
color:#FFF;
}
Strange what throwing caution to the wind does. It doesn't seem to support the :active :hover :focus :link :visited :after :before, though.
Example on JSFiddle: http://jsfiddle.net/Xd7TJ/2/