CSS: how to make a shortcut to the right of the radio?
Let's say I have the following inscription:
<label for="name">Name:</label>
<input type="radio" name="name" id="name"/>
The order of the tags seems correct to me (in a semantic sense: the label is in front of what you are labeling). But first I want to display this as a radio button and then a shortcut. How do I do this in CSS?
+3
source to share
6 answers
In this case, the order of the tags does not matter. And even if that were the case, then it would be the other way around: first you would need to create a radio button and then reference it in the label.
To answer your question: just do it in the order you want to display it
<input type="radio" name="name" id="name"/>
<label for="name">Name:</label>
fiddle http://jsfiddle.net/Jm2JR/1/ ..
+2
source to share
Hi you just define your input tag as such
<label>Name:
<input type="radio" name="name" id="name"/></label>
<br />
<label>
<input type="radio" name="name" id="name"/> Name
</label>
Live demo http://jsfiddle.net/rohitazad/bhBQn/1/
+1
source to share