How to change spacing between radio button and its text?

Viewed 120455

I have the following HTML:

<input type="radio" name="beds" value="1" />1+
<input type="radio" name="beds" value="2" />2+

How do I change the spacing between the radio button and the "1+" text? I'd like the text to be closer to the radio button, but the browser is inserting a certain amount of undefined padding between the two elements.

5 Answers

Just change the input id's width to auto in css.

#input-id {
width: auto;
}

You can add this to your stylesheet:

input[type="radio"] {  
  margin-right: 10px;
}

First Create id's inside input tag (eg id="input1"), then style id's in css file(eg #input1{margin-left:5px; margin-top:5px;}) also you can use inline styling using margin-top:5px,and margin-left:5px

img

Related