I have to build a form that has radio-type input to the right of the text (text-label) without changing the order of input-tag and label tag.
As the id's for input and label are being set dynamically and maybe due to this reason changing the order is not working instead the radio button is getting vanished. But I am not finding a way to do it.
Below is the code I wrote and the image of the desired outcome.
My code outcome:
Code below (it's a ruby on rails syntax):
<div class="options">
<input type="radio" id="<%=qid%>op1" name="<%=qid%>" value="<%= @questions[qid]["option1"] %>">
<label class="option-value" for="<%=qid%>op1">A. <%= @questions[qid]["option1"] %></label>
</div>
And the desired style I want to give
I also tried writing the input[type"radio"] after the label-tag but it's still not happening.
I also tried applying float:right css to input[type="radio] but it's not working either.

