|
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">
> <input name="btn_close" type="submit"
> value="Cancel">
> <input name="btn_save" type="submit" value="Save">
> </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]
|