Hi Naveen
Options are, as discussed, fieldsets and labels to assist with positioning.
There is nothing "illegal" about using form elements in a table - some see it
as the widget labels being in the "th" and the actual widgets being in
the "td". For a quick, single fieldset form, it's a useful layout especially
if time is of the essence. You could see it as a one row table but with two
columns, if that makes sense.
Does have some major drawbacks in that you can't easily relayout the form for
other uses using CSS. E.g in some instances I've used the same form markup
and presented in different ways using CSS. Definition lists really help out
there.
1. Fieldsets, legends, labels and associated form widgets. If you want to take
the legends out for whatever reason, then do <legend><span>my
legend</span></legend> and use "legend span {position : absolute;
left : -9000px;}" or similar in CSS.
Use fieldsets as block level elements to position them within the form.
2. As #1 but use a definition list inside each fieldset. Form labels go in the
dt, widgets in the dd. You can float the dt and dd to get a presentation
similar to your classic '97 grid layout with the added flexibility of being
able to re - layout it in another way.
You would need to use the "for" attribute to link labels with widgets as you
cannot, of course, wrap the widgets in the <label>
I've used DL's quite a bit and it works well especially when the client is apt
to change their mind and they want the form labels above the widgets instead
of to the left. You can just turn off the dt/dd float in that case.
If you have buttons at the bottom of a form, use a fieldset to contain those
and set its clear to "both" to clear any floated elements above.
HTH
James
On Wed, 13 Feb 2008 05:01:26 pm [EMAIL PROTECTED] wrote:
> Hi ,
>
>
>
> Could anyone tell me which is the best way to build a form without
> tables in w3c standards.
>
> I would really appreciate if you can provide a good referral link. J
>
>
>
> Thanks a ton in advance..
>
>
>
> Thanking you
>
> Naveen Bhaskar
>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************