formatting forms and using fieldset and legend

Hi

I have been working on a long form and thought that it would make sense
to use the fieldset and legend tags, something I've not done before.

http://www.sheffcol.ac.uk/choices/enquiry.html

and I've basically done this kind of thing:

      <fieldset>
        <h2>
          <legend>
            About You
          </legend>
        </h2>
        <table>
          <tr>
            <td>
              <label for="Firstname">
                First name
              </label> 
            </td>
            <td>
              <input type="text" name="Firstname" id="Firstname" size="30">
            </td>
          </tr>
        </table>
      </fieldset>

I'm using tables as it's to only way to get NN4 to layout form elements
without CSS inheritance breaking even more than usual.

The problem is that you don't seem to be able to have a legend in a h2
or a h2 in a legend, which is not good for backwards compatibility as I
want these to appear as headers (I could use CSS to make a legend render
as a h2 for some browsers I guess).

Also having a table within a fieldset seems to be invalid.

http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http://www.sheffcol.ac.uk/choices/enquiry.html&input=yes

I can see some options:

1.      remove the fieldset and legend mark up, and get valid HTML that
        is laid out OK in NN4 but perhaps worse for accessibility 

2.      remove the h2's, p's and tables and try to use CSS for layout,
        and get valid HTML that looks a mess in NN4 

3.      leave it as invalid html

I don't like these options, anyone have any better ideas?

Chris


-- 
Chris Croome <chris@webarchitects.co.uk>

http://www.webarchitects.co.uk/
http://chris.croome.net/

Received on Tuesday, 1 August 2000 11:32:32 UTC