[thelist] CSS Form layout w/out span|div

Morgan Kelsey morgan at morgankelsey.com
Thu Feb 20 09:23:07 CST 2003


ben,

> http://www.ripcord.co.nz/frames.php?redir=/articles/properlayout.html
>
> Above is an article on laying out forms using css - but without using
> structural markup in the form - using html4 form extensions:
> label
> legend
> and fieldset.
>
> View source - you may be pleasantly surprised. :)
>

are you looking for a critique?

for starters, setting the fieldset border to zero defeats the purpose of the
fieldset, which is to visually group form elements for the user.

you haven't used the tabindex or accesskey attributes anywhere, and your label's
don't work.

the label tag is intended to be used like so:
<input type="checkbox" id="foo" name="foo1" tabindex="10" accesskey="f" /><label
for="foo"><u>F</u>oo</label>

now clicking on the label will give focus to the form element, which is what the
label is for.

maybe laying out the form with css only is "hep" (or something), but lets make a
form that works good too, eh?


good luck,

nagrom
http://morgankelsey.com




More information about the thelist mailing list