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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<form> inserting a new line in netscape. Make it stop?

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
I'm having a problem with a page I'm creating. It is set up like the this.

-----------------------------------------------------
| MENUBAR |
-----------------------------------------------------
| |
| Header |
| |
-----------------------------------------------------

In between the menubar and header there is a <form> tag. It is inserting a space between the menubar and header. When I remove the form tag, the space is gone. In IE, I was able to solve the problem by writing <form style=&quot;display:inline&quot;> but the problem still exists in netscape.
 
try using style=&quot;margin:0px&quot; in the form tag or as a cheat that some people use you can put the opening form tag in side a table tag ie

<table id=Header ....>
<form name=form1 ...>
<tr><td></td></tr></form></table>

the above method returns you errors when run thru a validator but it should still render ok
 
Only problem is that you're not supposed to put a form in a table. Margin: 0 might be a better idea. ?



É

endamcg-logo1b.gif

 
Unfortunately, margin 0 doesn't make the problem go away. I found another way to solve the problem. I moved the <form> tag so that it is under the <body> tag rather than inbetween the menubar and the header. The problem with this is that I was thinking that I might put some form objects in the menubar in the future but it is just a little bit of code to get around any problems that might arise
 
Hi,

I had the same problem. When I validated some code I moved the form tags out of a table and it created extra unwanted space between two tables I had. I set margins and it solved it. I dont know how all browsers will handle it but it should be ok.



É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top