Reply to Re: </form> adds space to end of file?

Your name:

Reply:


Posted by Ben C on 11/26/07 08:55

On 2007-11-26, jodleren <sonnich@hot.ee> wrote:
> 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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация