I'm trying to style a radio button and place a label inline with the radio button using CSS.
But the radio button doesn't look right and its label is not inline with it.
I need to achieve this:
This is what I have so far:
input[type="radio"]{
display:none;
}
input[type="radio"] + label
{
background: #fff;
border: solid 2px #000;
height: 20px;
width: 20px;
display:inline-block;
padding: 0 0 0 0px;
border-radius:50%;
}
input[type="radio"]:checked + label
{
background: #000;
height: 20px;
width: 20px;
display:inline-block;
padding: 0 0 0 0px;
border-radius:50%;
}
<input type="radio" id="male" name="gender" value="M">
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="F">
<label for="female">Female</label>
EDIT:
I need the all the radio buttons and their labels all in one line.