I would like to write an HTML form with a short select field with the following features:
- All options are visible. That can be easily achieved with "size" = number of items.
- Those items should be displayed explicitly next to the label (on the right), as if they were switchable buttons.
If the code is something like this...
<div class="row">
<label for="myvar">Chose an option:</label>
<select class="form-control" id="myvar" name="myvar" size="5">
<option value="" selected="selected">
<option value="0" class="text-primary">Yes</option>
<option value="1" class="text-warning">No</option>
<option value="2" class="text-mutted">Sometimes</option>
</select>
</div>
I would like to have something like:
Chose an option: Yes
No
Sometimes
Basically, having the select options expanded horizontally to the right and visible.