
Signature
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
> > Is there a recommended way to line up form fields with their
> > labels so that the label column is right justified and the fields
> > are left justified?
>
> Forms are considered by many to be tabular data. Use a table.
It's a defensible option, for sure. But putting the label text and
the form control into different table cells prevents the use of the
implicit association variant of the <label> markup. So it's a
compromise.
In fact, the HTML spec picks up this point in so many words, when
describing the implicit association:
| Note that this technique cannot be used when a table is being used
| for layout, with the label in one cell and its associated control
| in another cell.
(from http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1)
regards
Johannes Koch - 28 Oct 2005 10:45 GMT
> But putting the label text and
> the form control into different table cells prevents the use of the
> implicit association variant of the <label> markup.
Which IMHO is a strange thing. A text within a p element is part of the
paragraph, a text within a h1 is part of the headline, a text within a
caption is part of the caption, a form control within a label is part of
the label ... ooops.

Signature
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
kchayka - 28 Oct 2005 19:49 GMT
> putting the label text and
> the form control into different table cells prevents the use of the
> implicit association variant of the <label> markup.
Well then, use the explicit variant! :)
IE doesn't support the implicit variety, anyway, at least not without
including an explicit "for".
> So it's a compromise.
I don't see it as such, though it is nice to have a choice. Use whatever
variant works best for your particular case.

Signature
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.