CSS:
input[type='radio'] {
position: absolute;
left: 42.5em;
top: 29.5em;
}
input[type='radio'][value='no'] {
position: absolute;
left: 46.4em;
top: 29.5em;
}
HTML:
<input type="radio" name="relocate" value="yes" />Yes<br>
<input type="radio" name="relocate" value="no" />No
When I apply the styles to the radio buttons it does not work, it does not toggle, it gets stuck. CSS HTML
Your problem is
position:absolute;, because an element is positioned relative to the first parent element that has a position other than static. Since you do not have any parent positioning in this example theinputgets positioned relatively to thehtmlblock.