0

Possible Duplicate:
Radio buttons and label to display in same line

I have 3 labels and radiobuttons that i want to put on 1 line:

What i get now is this:

Spoortoegang
Uit
radiobutton
Aan
radiobutton

What i want is:

Spoortoegang Uit radiobutton Aan radiobutton

My code for this is:

<div ><p>Spoortoegang</p><label for="no">Uit;<input dojoType="dijit.form.RadioButton"   id="valSR" name="group1" checked="checked" onchange='POI(this);' value="Show" type="radio"/>    </label>
<label for="yes">Aan;<input dojoType="dijit.form.RadioButton" id="valSlope" name="group1"   value="Hide" onchange='POI(this)' type="radio"/></label></div>
Community
  • 1
  • 1
David Raijmakers
  • 1,369
  • 1
  • 16
  • 40

3 Answers3

0

add "float: left" in css for all elements

Dziad Borowy
  • 12,368
  • 4
  • 41
  • 53
  • Why use float? There's no sign that any block rendering is needed, so float is unnecessarily fiddly (especially if elements end up being different heights) – Quentin Nov 23 '12 at 10:04
0

Use CSS for positioning DOM elements. As you want all elements to be inline:

p, label, input { display: inline; } 
Matt Stone
  • 3,705
  • 4
  • 23
  • 40
0

instead of putting it in a paragraph enclose it in a span like

<div ><span>Spoortoegang</span><div >
sayannayas
  • 764
  • 9
  • 15