You are here: irt.org | FAQ | JavaScript | Form | 1 | Q1212 [ previous next ]
First, don't omit the end form tag! Browsers may not render your form!
Place the </form> tag outside of a </td> tag and before the next <td> or </tr> or </table> tag.
There is a logical explantion for all of this:
</form> produces a line feed. The following HTML:
<form>Hello</form>World
results in:
Hello World
Whereas the following HTML:
a <table border="1"> b <tr> c <td> d </td> e </tr> f </table> g
Results in:
a b c e f +-+ |d| +-+ g
In other words: items of text and/or HTML found between table cells are rendered before the table. This means that the line break caused by </form> is place before the table.
The above maybe not be valid HTML, it may not always work on all browsers - but it does what you require.
Sean McCafferty replies:
You can suggest suppression of that margin in a style sheet, e.g.
<style type="text/css"><!-- form {margin-bottom : 0; } //--></style>