How do I add a space between text and a radio button?
I want one space between the text and the radio button. For this, I tried the answerBottomYesNo css class by adding margin-left: 7px. for some reason it didn't work. Below is the code snippet
<div class="questionRow odd">
<div class="question">
Ear Aches?
</div>
<div class="answers">
<label for="rbEarAches1"><span class="answerBottomYesNo" ><input type="radio" id="rbEarAches1" name="EarAches" value="true" data-bind="checked: EarAches">Yes</span></label>
<label for="rbEarAches0"><span class="answerBottomYesNo"><input type="radio" id="rbEarAches0" name="EarAches" value="false" data-bind="checked: EarAches">No</span></label>
</div>
</div>
What should I do to give a space between the radio button and the text. I could do nbsp, but I really want it in the CSS file. Help rate!
+3
source to share
1 answer
Instead span
add margin
in input type=radio
inside span
like this:
.answerBottomYesNo input[type="radio"]{
margin-right:20px;
}
See working fiddle: https://jsfiddle.net/4ageousp/
+4
source to share