I have the following html
<option
value = ''
disabled
selected>Type *
</option>
How can I make the 'Type' blue and the '*' red using css?
NB: Markup is NOT allowed where 'Type *' is present.
I have the following html
<option
value = ''
disabled
selected>Type *
</option>
How can I make the 'Type' blue and the '*' red using css?
NB: Markup is NOT allowed where 'Type *' is present.
This question has been asked many many many times here before. I suggest searching here or at google to find your answer.
Short Answer:
Styling <option>
tags only works in some browser and can be very sporadic. Some of the most popular browsers (i.e. Chrome) either don't or partially support option styling.
To better have better browser support you are probably better of using a select replacement such as Select2. Replacements like this make use of clever styling, js, and other elements to allow to style just about everything. I recommend taking a look at it.