What's a good way to insert <img src = "..." /> into <parameter> </option> in an HTML page?
3 answers
IMAGE ID cannot be within OPTION one (as per HTML4.01 and XHTML1.0). Apply it as a background image (of an option item).
...
<option style="background-image:url(...) ...">...</option>
...
Also note that some browsers do not allow for much styling of select and options. For example Safari doesn't support "background-color" on option elements (there's a WebKit bug filed back in '06 :))
I've heard that Chrome has similar "problems".
+5
source to share