<form>...</form> - how to supress blank space after </form> in IE?

Discussion in 'Javascript' started by rob c, Dec 30, 2005.

  1. rob c

    rob c Guest

    This is a minor thing and only appears in IE (so far), but I'd like to know to
    correct it (if possible).

    Whenever I use a form on a webpage, Explorer always leaves a blank line
    following the </form> tag but Mozilla doesn't. Is there a way to supress the
    blank line?

    Thanks
    Rob
    www.rcp.ca
    rob c, Dec 30, 2005
    #1
    1. Advertising

  2. rob c

    rob c Guest

    Re: <form>...</form> - how to supress blank space after </form>

    In message <43b573c4$0$26915$-online.net> - Martin
    Honnen <> writes:
    :>
    :>rob c wrote:
    :>
    :>> Whenever I use a form on a webpage, Explorer always leaves a blank line
    :>> following the </form> tag but Mozilla doesn't. Is there a way to supress the
    :>> blank line?
    :>
    :>form is a block element like div or p so what you see is probably the
    :>normal layout for the block element.
    :>CSS allows you to change that, see the display property for instance
    :> <http://www.w3.org/TR/CSS21/visuren.html#display-prop>
    :>With inline CSS you can do e.g.
    :> <form style="display: inline;">
    :>or you better use a stylesheet with e.g.
    :> #someForm { display: inline; }
    :>and then an id attribute
    :> <form id="someForm">
    :>on that form element.
    :>Depending on what you want to change it might also be helpful or
    :>necessary to change the margin e.g.
    :> <form style="margin-bottom: 0;">
    :>If you have further questions on that try a tutorial on CSS and then a
    :>CSS newsgroup.
    :>
    :>--
    :>
    :> Martin Honnen
    :> http://JavaScript.FAQTs.com/

    As soon as you said "...form is a block element like div or p..." a small
    light bulb started to flicker.

    Thank you!
    Rob
    rob c, Dec 30, 2005
    #2
    1. Advertising

  3. rob c

    Randy Webb Guest

    Re: <form>...</form> - how to supress blank space after </form>in IE?

    rob c said the following on 12/30/2005 12:13 PM:
    > This is a minor thing and only appears in IE (so far), but I'd like to know to
    > correct it (if possible).
    >
    > Whenever I use a form on a webpage, Explorer always leaves a blank line
    > following the </form> tag but Mozilla doesn't. Is there a way to supress the
    > blank line?


    Remove the extra whitespace from your source code.

    Irrelevant to JS though.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Dec 30, 2005
    #3
  4. Re: <form>...</form> - how to supress blank space after </form>in IE?

    rob c wrote:

    > Whenever I use a form on a webpage, Explorer always leaves a blank line
    > following the </form> tag but Mozilla doesn't. Is there a way to supress the
    > blank line?


    form is a block element like div or p so what you see is probably the
    normal layout for the block element.
    CSS allows you to change that, see the display property for instance
    <http://www.w3.org/TR/CSS21/visuren.html#display-prop>
    With inline CSS you can do e.g.
    <form style="display: inline;">
    or you better use a stylesheet with e.g.
    #someForm { display: inline; }
    and then an id attribute
    <form id="someForm">
    on that form element.
    Depending on what you want to change it might also be helpful or
    necessary to change the margin e.g.
    <form style="margin-bottom: 0;">
    If you have further questions on that try a tutorial on CSS and then a
    CSS newsgroup.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Dec 30, 2005
    #4
  5. rob c

    McKirahan Guest

    "rob c" <> wrote in message
    news:...
    >
    > This is a minor thing and only appears in IE (so far), but I'd like to

    know to
    > correct it (if possible).
    >
    > Whenever I use a form on a webpage, Explorer always leaves a blank line
    > following the </form> tag but Mozilla doesn't. Is there a way to supress

    the
    > blank line?
    >
    > Thanks
    > Rob
    > www.rcp.ca
    >


    Try: <form style="margin:0px">
    McKirahan, Dec 30, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JG
    Replies:
    3
    Views:
    4,014
    Scott Allen
    Oct 21, 2004
  2. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,885
    Bryan Bullard
    Jul 11, 2003
  3. Christian Seberino
    Replies:
    21
    Views:
    1,649
    Stephen Horne
    Oct 27, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    1,006
    Steve Lamb
    Oct 23, 2003
  5. Ian Bicking
    Replies:
    2
    Views:
    717
    Michael Hudson
    Oct 24, 2003
Loading...

Share This Page