- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Radio buttons all on one line
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Radio buttons all on one line"
Collapse
-
If it's still not working Suity, get Firebug on it and check which CSS is being applied to those elements to bork it. It may need tweaked to not affect those, or you may need some new CSS rules to fix your problem.
-
Originally posted by suityou01 View PostI thought that (but haven't tried it yet, so that's the first thing I will try tonight).
In all the examples I looked at the label superseded the input tag (not doubting you here) I just thought the "for" attribute in the label tag negated the need to nest.
In the example I tried on MSs jsfiddle, the tags were not nested but the desired result was displayed.
Either way is ok. If you put an input inside the label it has to be the associated one, can't include any others. I usually keep them separate because I find it makes it easier to style and position them where I want.Originally posted by Zippy View PostI believe you are right. "for" means the user can click on the label and access the control, so a useability thing.
Leave a comment:
-
I believe you are right. "for" means the user can click on the label and access the control, so a useability thing.Originally posted by suityou01 View PostI
In all the examples I looked at the label superseded the input tag (not doubting you here) I just thought the "for" attribute in the label tag negated the need to nest.
Leave a comment:
-
I thought that (but haven't tried it yet, so that's the first thing I will try tonight).Originally posted by eek View Postnot quite you need to nest the input within the label tag not before or after it.
Code:<fieldset> <legend>Data Entry</legend> <label for = "standardentry"><input type = "radio" name = "standardentry" id = "standardentry" value = "standard" checked = "checked" /> Standard Entry</label> <label for = "quickentry"><input type = "radio" name = "quickentry" id = "quickentry" value = "quick"/> Quick Entry</label> </fieldset>
In all the examples I looked at the label superseded the input tag (not doubting you here) I just thought the "for" attribute in the label tag negated the need to nest.
In the example I tried on MSs jsfiddle, the tags were not nested but the desired result was displayed.
Leave a comment:
-
not quite you need to nest the input within the label tag not before or after it.Originally posted by suityou01 View PostI tried it in jsfiddle and it works ok.
Clearly some residual css that's borked it. OK as you were folks, it's me being thick (again). I'll look at it tonight.
Neat site btw
Code:<fieldset> <legend>Data Entry</legend> <label for = "standardentry"><input type = "radio" name = "standardentry" id = "standardentry" value = "standard" checked = "checked" /> Standard Entry</label> <label for = "quickentry"><input type = "radio" name = "quickentry" id = "quickentry" value = "quick"/> Quick Entry</label> </fieldset>
Leave a comment:
-
I tried it in jsfiddle and it works ok.Originally posted by mudskipper View PostDunno if this is the best way, but it works.
Edit this Fiddle - jsFiddleHTML Code:<label>No <input type="radio" name="suity" value="no"/></label> <label>Yes <input type="radio" name="suity" value="yes"/></label>

Clearly some residual css that's borked it. OK as you were folks, it's me being thick (again). I'll look at it tonight.
Neat site btw
Leave a comment:
-
Thanks. Can I ask, where is the frameset in your examples?
How to Create a Radio Button in an HTML5 Form - For Dummies
See how this example works. I do the same and it goes all over the place.
Technically I think labels and radios are "inline" by default so it should work "out of box".
I observe differently though.
Edit : Actually posting the html I am using may help those that have already been so kind as to offer a potential solution. Should have done this right at the start. Apologies.
Code:<fieldset> <legend>Data Entry</legend> <p> <input type = "radio" name = "standardentry" id = "standardentry" value = "standard" checked = "checked" /> <label for = "standardentry">Standard Entry</label> <input type = "radio" name = "quickentry" id = "quickentry" value = "quick"/> <label for = "quickentry">Quick Entry</label> </p> </fieldset>
Last edited by suityou01; 23 May 2013, 07:03.
Leave a comment:
-
Surely itsOriginally posted by mudskipper View PostGive us a chance - I was just having a fiddle.
to get the text after the radiobutton.Code:<label><input type="radio" name="suity" value="no" />No </label> <label><input type="radio" name="suity" value="yes"/>Yes </label>
Are you sure you don't have other css adding a line break.
Leave a comment:
-
Give us a chance - I was just having a fiddle.Originally posted by suityou01 View Post42 views and no suggestions?
Think of the kudos people?
Leave a comment:
-
Dunno if this is the best way, but it works.
Edit this Fiddle - jsFiddleHTML Code:<label>No <input type="radio" name="suity" value="no"/></label> <label>Yes <input type="radio" name="suity" value="yes"/></label>
Leave a comment:
-
Radio buttons all on one line
OK little html css pop quiz for anyone that's up for it.
[Read I've spent all evening messing to get precisely nowhere]
I want, two radio buttons, with corresponding labels, in a frameset, all on one line.
That's it. Nothing more.
So that's
(.) Some label (.) Some other label
What I get is
(.) (.) Some label Some other label
No matter what I try.
In desperation I switched to <ul> but got the same end result. Both in FF and IE10.
Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: