Space after a form

Hi. Can anyone tell me how to fix this problem. I have inserted a form within a table cell. After the form is a line space, that i cannot get rid of.<br />
<table border="1"><br />
<tr><br />
<td><br />
<form>test text</form><br />
</td><br />
</tr><br />
</table><br />
<br />
The only way i can successfully remove this space is to put the <td> tags inside the form. i.e. <table border="1"><br />
<tr><br />
<form><td>test text</td></form> <br />
</tr><br />
</table> <br />
This does work, but is not valid xhtml markup. Does anyone have any ideas?<!--content-->Yeah, do not use tables in the first place.<br />
Space after your form is presentational issue that should be addressed with CSS (after your document is converted to semantically meaningful markup).<!--content-->I cannot remove the tables i am afraid. This form is a common element on all pages of 17 websites (same site, but in different languages).<br />
<br />
How do i use CSS to change this?<!--content-->I'm guessing here because I haven't tested it but:<br />
In the head section of your document<br />
<br />
<style type="text/css"><!--<br />
form {<br />
margin: 0;<br />
padding: 0;<br />
}<br />
--></style><!--content-->Moving the form element to the top of the table will resolve the issue, also. Rather messy, though!<br />
<br />
<form> <br />
<table border="1"><br />
<tr><br />
<td><br />
<br />
</td><br />
</tr><br />
</table><br />
</form><br />
<br />
Regards.<!--content-->Thanks DaveSW<br />
<br />
Padding:0 had no effect, but Margin:0 did the job nicely.<!--content-->I would leaver the margin:0 in though becuase doesnt some different browsers render it as padding and some as margin could someone clarify this please.<!--content-->The W3C's recomended css (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/sample.html">http://www.w3.org/TR/REC-CSS2/sample.html</a><!-- m -->) sets this property.<!--content-->
 
Back
Top