Reputation:
Whenever I try adding radio buttons to my form it becomes vertical and it no longer functions. I need to get the radio to show and be horizontal. I add input
to each div
but it alters the forms design and function.
Also I tried:
input {
display:inline-block;
}
Working JSFiddle: http://jsfiddle.net/RC3e4/16/ (When an option is clicked it displays hidden text)
Non-working JSFiddle: http://jsfiddle.net/RC3e4/23/
<div class="" type="radio" name="q1" value="Broken">
Upvotes: 0
Views: 388
Reputation: 8130
first of all. divs don't have a type
attribute. Theres no reason to use that. You can give them an id
, or a class
to identify them.
second of all. divs are block elements. this means they go top to bottom. html has no way of knowing whether you want things to flow from left to right, or top to bottom. You need to use the float
css property on the divs.
when things become difficult. you need to make a basic example and work from there.
here is a simple example to work from
Upvotes: 4