Is there a simple way to add a styled line of small text next to the first line in a select box?
For example:
I'm using code like the following:
<select name="textarea" size="10" multiple="multiple" id="textarea">
<option>something</option>
<option>something else</option>
<option>another thing</option>
</select>
开发者_开发技巧
The text would only ever need to be displayed next to what ever data was on the first line. If you could help that would be brilliant!
option
elements do not allow nesting of other html element, so you wouldn't be able to change the style of part of the string. You can, of course, use a javascript "fancy drop-down"-type script that will create a pseudo-select element that allows you to go nuts with the styles. But with a plain old select
tag, no dice.
精彩评论