</form> adds space to end of file?

J

jodleren

Hi!

I have a "problem", that in to tables (cascaded), that </form> adds /
takes up space at the end of my file....

in PHP, I have:
</table><?php
}
echo "</form>";

Which results in:

<tr><td colspan=12 align="center">
&nbsp;<input name="btn_close" type="submit"
value="Cancel">&nbsp;&nbsp;&nbsp;
&nbsp;<input name="btn_save" type="submit" value="Save">&nbsp;
</td></tr>
</table></form></td><td width=5></td></tr>

Removing the </form> and it takes up less space... I have a feeling
that it is this specific file, but I cannto figure what causes it.

WBR
Sonnich
 
B

Ben C

Hi!

I have a "problem", that in to tables (cascaded), that </form> adds /
takes up space at the end of my file....

in PHP, I have:
</table><?php
}
echo "</form>";

Which results in:

<tr><td colspan=12 align="center">
&nbsp;<input name="btn_close" type="submit"
value="Cancel">&nbsp;&nbsp;&nbsp;
&nbsp;<input name="btn_save" type="submit" value="Save">&nbsp;
</td></tr>
</table></form></td><td width=5></td></tr>

Removing the </form> and it takes up less space... I have a feeling
that it is this specific file, but I cannto figure what causes it.

It is probably the default bottom margin of 1em on form applied by many
browsers in quirks mode (although some do it whether in quirks mode or
not).

Leave the </form> in (assuming there is a corresponding <form>,
validate the HTML to be sure).

Set form { margin-bottom: 0 } in the styles, e.g. by using <form
style="margin-bottom: 0"> at the point of opening it, although using
external stylesheets is usually a better way to organize your styles.

Don't be tempted to leave </form> out. You may get the display you want
but you're relying on how browsers heuristically patch up invalid
markup, which is risky and likely to bite you later.
 
E

Els

jodleren said:
I have a "problem", that in to tables (cascaded), that </form> adds /
takes up space at the end of my file....

Set this in your stylesheet:
form{margin-bottom:0;}
 
E

Els

Ben said:
It is probably the default bottom margin of 1em on form applied by many
browsers in quirks mode (although some do it whether in quirks mode or
not).

[snip]

Oops, sorry Ben, didn't see your reply before I wrote mine. Yours is
complete enough not to add to it :)
 
J

jodleren

On 2007-11-26, jodleren <[email protected]> wrote:
Set form { margin-bottom: 0 } in the styles, e.g. by using <form
style="margin-bottom: 0"> at the point of opening it, although using
external stylesheets is usually a better way to organize your styles.

Don't be tempted to leave </form> out. You may get the display you want
but you're relying on how browsers heuristically patch up invalid
markup, which is risky and likely to bite you later.- Hide quoted text -

Thanks, that helped

WBR
Sonnich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top