Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to deal with FORM tag 1

Status
Not open for further replies.

Einstein47

Programmer
Nov 29, 2001
737
US
Hey all,

I have been doing my FORM tags this way for a long time now. However we have upgraded our editor and now it keeps giving me HTML errors. What is wrong with putting my FORM tag like this:

Code:
<TABLE border="0">
<FORM name="lookup" method="post" action="SelectLocationPopup" onsubmit="return validate()">
  <TR>

...

</TR>
</FORM>
</TABLE>

I do this because otherwise the FORM tag will make a 1/2 inch blank line on my page. I really don't want that. If there is a better (meaning more standard) way of FORM tag placement in HTML, I would be willing to change.

Thanks in advance,

Einstein47
(&quot;The pure and simple truth is rarely pure and never simple.&quot; - Oscar Wilde)
 
your form tag should BE outside your table

<form>
<table>
<tr>
<td>blah</td>
</tr>
</table>
</form>
 
Also use CSS to define your Form margins so you dont get that "space" around it.
 

I normally put my open form tag right after the open body tag, and close my form tag right before the close body tag. This way, I find you don't normally get the whitespace problems.

Dan
 
Except for banana scripts I'm using form { display:inline; } CSS definition.
 
Simple server-side scripts for administrative and mostly temporary purposes. Such scripts don't need any face-lifting or user-friendly stuff - you write 'em ASAP, run, throw somewhere and forget. My banana scripts are probably Netscape 2.0 compliant :X
 
vongrunt - you get a star just for making me laugh - well, your trick worked too.

I appreciate all the responces this has generated - you guys are all awesome!

Einstein47
(&quot;The pure and simple truth is rarely pure and never simple.&quot; - Oscar Wilde)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top