[Html-widget] Radio button group

Carl Franks fireartist at gmail.com
Mon Sep 25 11:48:45 CEST 2006


Ok, legend isn't the correct tag to use for a RadioGroup.

The xhtml spec says:
"The fieldset element is used to group form fields.
Only one legend element should occur in the content
and if present should only be preceded by whitespace."

I've checked how Dreamweaver creates groups of radio buttons, and
there's 2 options...

  <p>
    <label>
    <input type="radio" name="foo" value="0" />
    false</label>
    <br />
    <label>
    <input type="radio" name="foo" value="1" />
    true</label>
    <br />
  </p>

Or...

  <table width="200">
    <tr>
      <td><label>
        <input type="radio" name="foo" value="0" />
        false</label></td>
    </tr>
    <tr>
      <td><label>
        <input type="radio" name="foo" value="1" />
        true</label></td>
    </tr>
  </table>

I think both are a bit yuck.
I suggest we surround the RadioGroup with a DIV, and give it a general
class name, so that  you can do this if you want all radio buttons on
the same line...

.radiogroup {
    block: inline;
}



More information about the Html-widget mailing list