4
votes

I want single space between the text and radio button. To achieve this I tried the css class answerBottomYesNo by adding margin-left: 7px . for some reason it did not work. Below is 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 text. I could have done nbsp but I really want this to reside in the CSS file. Help appreciated!

1
add margin in radio button {.answerBottomYesNo input[type="radio"]} - Roy Sonasish

1 Answers

5
votes

Instead of span, add margin to input type=radio inside the span like this:

.answerBottomYesNo input[type="radio"]{
    margin-right:20px;
}

See the working fiddle: https://jsfiddle.net/4ageousp/