0

I want to set the background-color of specific options in a select menu.

On the desktop browsers it works fine, but when i look on my smartphone (android with chrome) no background-color is shown up.

I do it like:

<select>
   <options></options>
   <options class="color"></options>
   <options></options>
 </select

and style it:

.color{background-color : #999;}

Does anyone know a solution?

amernov
  • 626
  • 1
  • 8
  • 18

1 Answers1

0

What i see is INVALID css formating.

Try removing quotation mark for color declaration

.color{background-color : #999;}

For a last try,

.color{background-color : #999!important;}

Could this help you : http://www.androidpeople.com/android-custom-listview-tutorial-part-2 ? Actually, there is not enough information on you context to figure out what's happening. ( DOCTYPE, css stack order, html validation, etc )

I am not sure if you want to stylize a <select> or a <list view>

Milche Patern
  • 19,632
  • 6
  • 35
  • 52