Issue
I have a SELECT list with several OPTION elements. Here is my naive approach to styling part of the option text:
<select name="color">
<option value="0">red <span style="font-weight: bold;">SLOW</span></option>
<option value="1">blue <span style="font-weight: bold;">SLOWER</span></option>
<option value="2">green <span style="font-weight: bold;">SLOWEST</span></option>
</select>
This does not work: the browser does not like a SPAN element inside the OPTION element.
Is there some other way to style part of an OPTION element's text?
Solution
Nope. option
s are styled in a way native to the platform, and styling only a part of one doesn't work. (It usually wouldn't be a particularly good idea either.)
Answered By - Ms2ger
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.