I have a dropdown select element with car names and their available colors inside parentheses. I would like to be able to do something like this:
<select class="cars">
<option>Rolls Royce Phantom <span class="car-color">(silver)</span></option>
<option>Ferrari 488GTB <span class="car-color">(yellow)</span></option>
<option>Chevrolet Camaro <span class="car-color">(black)</span></option>
</select>
where
.cars {
color: black;
font-weight: bold;
}
.car-color {
color: grey;
font-weight: normal;
}
This code above is not working, unfortunately. How do I reach a desired effect?