I have been attempting to create a column layout inside of <select>
using CSS, but so far I have been unsuccessful.
https://i.sstatic.net/ltIDl.png
This is the HTML code I have tried:
<select id="select-bill-period">
<option>Select a bill period</option>
<option><span>Current bill</span> <span>£21.99</span></option>
<option><span>20 Oct 2015</span> <span>£45.99</span> <span>Archived</span></option>
<option><span>20 Oct 2015</span> <span>£45.99</span> <span>Archived</span></option>
<option><span>20 Oct 2015</span> <span>£45.99</span> <span>Archived</span></option>
</select>
Using
is not a practical solution for me, as we are unable to use <span>
or any other tag within the <option>
tag. Is there any way to achieve the column structure within the <select>
box?