I have added a Select element to an Asp.net page and on each option inside this element I've set the style="background-color: example_color"
. As outlined in this answer.
When I debug the website and hover the option it is highlighted the correct color specified in the style property, but after I select it and tab to another element on the page, the background color is the normal white color and not the blue or green color defined.
Question: How can I set an option color after it's been selected?
- Select element after it's selected:
Code:
Select element markup:
<div class="form-control">
<label class="col-md-3 control-label" for="Current Status">Status</label>
<div class="col-md-8">
<select id="Status" name="Status" onchange="" class="form-control">
<option style="background-color: blue" value="Down">Down</option>
<option style="background-color: green" value="BCR">BCR</option>
</select>
</div>
</div>