dan dan - 4 years ago 83
CSS Question

Windows mobile 10: white text in option tags are invisible

I have a styling for a selectbox with makes it dark background with white text:

select{
background-color: #000000;
color: #ffffff;
}


In the stock browser of Windows Phone 10 (Edge browser) if you open a select field you get, like in most other mobile browsers with input fields, a OS specific view of the
<option>
entries. The Edge Browser shows the select entries with white background, with the white text I use, the
<option>
entries are invisible. Does anyone know how to fix this?

What I tried:

select:focus::-ms-value{
color: #000000; /* not working */
}

select::-ms-expand {
color: #000000; /* not working */
}

Answer Source

Edge on WP10 will respect the color property on an option selector so you can do this...

select {
  background-color: #000000;
  color: #ffffff;

  option: {
    color: #000000;
  }
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download