I have a select box below that works perfectly; I however want to place a little colour box in each of the option groups. I tried using a span tag within it but it does not seem to work.
I don't want to use anchor tags or images. I would prefer if possible just to have some kind of container tag.
I have enclosed my code below.
<select name="search-legend">
<option value=""></option>
<option value="1"<?= $this->ReturnSearchValue == "1" ? 'selected' : '' ?>> <span id="redbox"> </span> value1 </option>
<option value="2"<?= $this->ReturnSearchValue == "2" ? 'selected' : '' ?>> <span id="bluebox"></span> value2 </option>
<option value="3"<?= $this->ReturnSearchValue == "3" ? 'selected' : '' ?>> <span id="greenbox"></span> value3 </option>
</select>
the css
#redbox {
background: red;
}