• 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!
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.

Previously on "Radio buttons all on one line"

Collapse

  • Bunk
    replied
    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.

    Leave a comment:


  • Bunk
    replied
    Originally posted by suityou01 View Post
    I 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.
    Originally posted by Zippy View Post
    I believe you are right. "for" means the user can click on the label and access the control, so a useability thing.
    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.

    Leave a comment:


  • Zippy
    replied
    Originally posted by suityou01 View Post
    I
    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.
    I believe you are right. "for" means the user can click on the label and access the control, so a useability thing.

    Leave a comment:


  • suityou01
    replied
    Originally posted by eek View Post
    not 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>
    I 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.

    Leave a comment:


  • eek
    replied
    Originally posted by suityou01 View Post
    I 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
    not 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>

    Leave a comment:


  • suityou01
    replied
    Originally posted by mudskipper View Post
    Dunno if this is the best way, but it works.

    HTML Code:
    <label>No&nbsp;<input type="radio" name="suity" value="no"/></label>
    <label>Yes&nbsp;<input type="radio" name="suity" value="yes"/></label>
    Edit this Fiddle - jsFiddle
    I 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

    Leave a comment:


  • suityou01
    replied
    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:


  • eek
    replied
    Originally posted by mudskipper View Post
    Give us a chance - I was just having a fiddle.
    Surely its

    Code:
    <label><input type="radio" name="suity" value="no"  />No&nbsp;</label>
    <label><input type="radio" name="suity" value="yes"/>Yes&nbsp;</label>
    to get the text after the radiobutton.

    Are you sure you don't have other css adding a line break.

    Leave a comment:


  • mudskipper
    replied
    Originally posted by suityou01 View Post
    42 views and no suggestions?

    Think of the kudos people?
    Give us a chance - I was just having a fiddle.

    Leave a comment:


  • mudskipper
    replied
    Dunno if this is the best way, but it works.

    HTML Code:
    <label>No&nbsp;<input type="radio" name="suity" value="no"/></label>
    <label>Yes&nbsp;<input type="radio" name="suity" value="yes"/></label>
    Edit this Fiddle - jsFiddle

    Leave a comment:


  • suityou01
    replied
    42 views and no suggestions?

    Think of the kudos people?

    Leave a comment:


  • suityou01
    started a topic Radio buttons all on one line

    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.

Working...
X