I want these radio inputs to stretch across the screen, rather than one beneath the other:
HTML
<input type="radio" name="editList" value="always">Always
<br>
<input type="radio" name="editList" value="never">Never
<br>
<input type="radio" name="editList" value="costChange">Cost Change
CSS
input[type="radio"] {
margin-left:10px;
}
http://jsfiddle.net/clayshannon/8wRT3/13/
I've monkeyed around with the display properties, and googled, and bang (bung? binged?) for an answer, but haven't found one.
Here is updated Fiddle
Simply remove
</br>
between input radio'sIn your case, you just need to remove the line breaks (
<br>
tags) between the elements -input
elements areinline-block
by default (in Chrome at least). (updated example).I'd suggest using
<label>
elements, though. In doing so, clicking on the label will check the element too. Either associate the<label>
'sfor
attribute with the<input>
'sid
: (example)..or wrap the
<label>
elements around the<input>
elements directly: (example)You can also get fancy and use the
:checked
pseudo class.To get your radio button to list horizontally , just add
RepeatDirection="Horizontal"
to your .aspx file where the asp:radiobuttonlist is being declared.