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

R

rob c

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
 
R

rob c

In message <[email protected]> - Martin
:>
:>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
 
R

Randy Webb

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.
 
M

Martin Honnen

rob said:
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.
 
M

McKirahan

rob c said:
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">
 

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
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top