Connecting Tech Pros Worldwide Forums | Help | Site Map

Use of <fieldset>/<legend> in Tables

Adam Smith
Guest
 
Posts: n/a
#1: Jan 12 '06
Hello,

Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to
select multiple rows in a Table such that I can demarcate several rows
containing form elements in a table?

Thanks

Els
Guest
 
Posts: n/a
#2: Jan 12 '06

re: Use of <fieldset>/<legend> in Tables


Adam Smith wrote:
[color=blue]
> Hello,
>
> Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to
> select multiple rows in a Table such that I can demarcate several rows
> containing form elements in a table?[/color]

No, you can't put anything between <table> and <tr>.
If you really need to have a form in only part of the table, you'd
need to nest another table inside a <td>.
Another option is to have the <form> and <fieldset> tags outside the
entire table.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Eurythmics & Aretha Franklin - Sisters Are Doing It For
Themselves
Benjamin Niemann
Guest
 
Posts: n/a
#3: Jan 12 '06

re: Use of <fieldset>/<legend> in Tables


Adam Smith wrote:
[color=blue]
> Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to
> select multiple rows in a Table such that I can demarcate several rows
> containing form elements in a table?[/color]

No.

Invalid nesting,
<fieldset><legend><tr></tr> <tr></tr></legend></fieldset>
would be correctly nested.
But it's still invalid, because FIELDSET is not a valid child for a TBODY
element. You cannot put anything 'around' one or more table rows (except
for THEAD, TBODY or TFOOT, with TBODY being implied, if you omit the start
and/or end tag of it).

You cannot even put a TABLE into the LEGEND, because only inline elements
are allowed there and TABLE is a block element.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Els
Guest
 
Posts: n/a
#4: Jan 12 '06

re: Use of <fieldset>/<legend> in Tables


Benjamin Niemann wrote:
[color=blue]
> But it's still invalid, because FIELDSET is not a valid child for a TBODY
> element. You cannot put anything 'around' one or more table rows (except
> for THEAD, TBODY or TFOOT, with TBODY being implied, if you omit the start
> and/or end tag of it).[/color]

I keep forgetting to mention thead etc when saying nothing is allowed
between table and tr :\

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Christina Aguilera - Cruz
Harlan Messinger
Guest
 
Posts: n/a
#5: Jan 12 '06

re: Use of <fieldset>/<legend> in Tables


Els wrote:[color=blue]
> Adam Smith wrote:
>
>[color=green]
>>Hello,
>>
>>Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to
>>select multiple rows in a Table such that I can demarcate several rows
>>containing form elements in a table?[/color]
>
>
> No, you can't put anything between <table> and <tr>.[/color]

Except thead, tbody, tfoot.
[color=blue]
> If you really need to have a form in only part of the table, you'd
> need to nest another table inside a <td>.[/color]

The usual motivation for this kind of thing is to obtain uniform column
widths from one form to the next, but unfortunately you can't accomplish
that with valid HTML. CSS will do it if min-width and max-width are
strictly applied by the browser.
Closed Thread


Similar HTML / CSS bytes