Forum Moderators: open

Message Too Old, No Replies

FORM around TD - Datacell. Does not Validate

         

organic21

1:29 pm on May 15, 2003 (gmt 0)

10+ Year Member



Hi everyone

Line 22, column 59: document type does not allow element "FORM" here

Thats the error message i get when trying to validate my html document.

<form>
<tr>
<td>

<input blah blah>
<input blah blah>
<input blah blah>

</td>
</tr>
</form>

thats my code
if i try to put the form tags within the td. it moves the whole table around.
Any suggestions?!?

thanks

BlobFisk

1:35 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use some CSS:

form {
display: block;
}

Or, a far less elegant method would be to open the form right before the <table> and close it right after the </table>.

matkat

2:04 pm on May 15, 2003 (gmt 0)

10+ Year Member



Have you tried <form><table><tr><td>...</td></tr></table></form>

organic21

2:12 pm on May 15, 2003 (gmt 0)

10+ Year Member



i use the table for layout, puttin the form around the table, would mean i put the form around almost all of my page content

is that a good thing to do in general?!

BlobFisk

2:13 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd recommend going down the CSS route first (leaving the form withing the <td> and see if that clears up the issue.

matkat

2:31 pm on May 15, 2003 (gmt 0)

10+ Year Member



If you don't want to go with css then let me expand what I offered earlier. I have a page that has a form on it. It's more expansive than this but basically it's:
<table><tr><td><form><table><tr><td>...</td></tr></table></form></td></tr></table>
This sets a table (mostly to use a fixed width) for the page with content above and below a form that is used to submit questions and requests to me. It validates.

organic21

3:23 pm on May 15, 2003 (gmt 0)

10+ Year Member



Ok

Thanks a lot
the css solution works perfectly