Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > </form> adds space to end of file?

Reply
Thread Tools

</form> adds space to end of file?

 
 
jodleren
Guest
Posts: n/a
 
      11-26-2007
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


 
Reply With Quote
 
 
 
 
Ben C
Guest
Posts: n/a
 
      11-26-2007
On 2007-11-26, jodleren <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      11-26-2007
jodleren wrote:

> 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;}

--
Els http://locusmeus.com/
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      11-26-2007
Ben C wrote:

> 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


--
Els http://locusmeus.com/
 
Reply With Quote
 
jodleren
Guest
Posts: n/a
 
      11-26-2007
On Nov 26, 10:55 am, Ben C <(E-Mail Removed)> wrote:
> On 2007-11-26, jodleren <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Python style guide (PEP-8) says 4 space indents instead of 8 space??? 8 space indents ever ok?? Christian Seberino Python 21 10-27-2003 04:20 PM
Re: Why Python style guide (PEP-8) says 4 space indents instead of8 space??? 8 space indents ever ok?? Ian Bicking Python 2 10-24-2003 11:15 AM
Re: Why Python style guide (PEP-8) says 4 space indents instead of8 space??? 8 space indents ever ok?? Ian Bicking Python 2 10-23-2003 07:07 AM
Print always puts newline (or adds a space) Tobiah Python 5 09-16-2003 07:43 PM
Stack space, global space, heap space Shuo Xiang C Programming 10 07-11-2003 07:30 PM



Advertisments