I wish to make HTML radio buttons which have labels after them, and also numbers in front of them. Is this possible to do this with standart HTML input tag and CSS? Javascript is also acceptable if not too complex, say with Jquery. The list of elements is created with JSF h:selectOneRadio tag, and I wish to still keep use of this tag, if possible without splitting into separate h:selectOneRadio elements.
JSF looks like this:
<h:selectOneRadio id="#{id}" label="#{label}" value="#{customValue}"
immediate="#{immediate}" requiredMessage="#{requiredMessage}"
>
<f:selectItems var="item"
value="#{classifier[empty classifier ? property : classifier]}"
itemLabel="#{empty itemLabel?item.meaning:itemLabel}"
itemValue="#{item}" />
<ui:insert />
</h:selectOneRadio>
Generated html looks something like this:
<tbody>
<tr>
<td>
<input id="0" type="radio" name="mcData" value="1200" >
<label for="0"> option1</label>
</td>
</tr>
<tr>
<td>
<input id="1" type="radio" name="mcData" value="1199">
<label for="1"> option2</label>
</td>
</tr>
</tbody>
I tried CSS like this
.radio::before {
content: "1";
}
but it only adds constant number before each checkbox.
The output should look like
○ Option1
⦿ Option2
○ Option3