<FORM> tag *sometimes* throws carriage return... How do I make HTML code look the same in Netsape &

Discussion in 'HTML' started by Shiperton Henethe, Nov 26, 2004.

  1. Hi

    It seems that the <FORM> tag throws a carriage return in MSIE (6),
    but not in Netscape (7.1).

    What is the best way to get HTML code to look the same in both
    Netscape and MSIE?

    Is it incorrect nesting to put the <FORM> tag between a <TABLE>and
    a <TR> tag?

    e.g. something like this:


    <FORM ...>



    With thanks

    Shiperton Henethe
    Shiperton Henethe, Nov 26, 2004
    1. Advertisements

  2. Shiperton Henethe

    SpaceGirl Guest

    <form style="margin-bottom:0px" ...>

    That's the fix for IE. For some reason IE sticks a margin in at the
    bottom of forms. Other browsers dont.


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
    SpaceGirl, Nov 26, 2004
    1. Advertisements

  3. Shiperton Henethe

    Philip Ronan Guest


    A <FORM> element can contain block level elements only. So put the table
    inside the form like this

    <FORM ... >
    <TABLE ... >
    Philip Ronan, Nov 26, 2004
  4. Shiperton Henethe

    Danny Guest

    Put this in the head of the doc:

    <style type="text/css">
    form {margin: 0px;}
    Danny, Nov 26, 2004
  5. Don't use the <!-- comment --> tags, and you don't need units if the
    value is zero.

    <style type="text/css">
    form { margin: 0; }
    Beauregard T. Shagnasty, Nov 26, 2004
  6. Shiperton Henethe

    Danny Guest

    Beauregard T. Shagnasty wrote:

    Thanks Beau,

    I suppose that's better than my suggestion. Out of curiosity: why not
    the comment tags?
    Danny, Nov 26, 2004
  7. Shiperton Henethe

    Neal Guest

    They were employed to hide the CSS from old browsers which are not used in
    any appreciable number today. As such, since it was originally a
    non-standard hack, it should be abandoned.
    Neal, Nov 26, 2004
  8. Shiperton Henethe

    Danny Guest

    OK, so they're harmless but a sore to a coder's eye. Thanks.
    Danny, Nov 26, 2004
  9. They are not really harmless. Yes, in html they seem harmless enough, but
    once you have learned to use them as a bad habit, you will not understand
    why your styles don't get applied to your xml pages.
    Barbara de Zoete, Nov 26, 2004
  10. Shiperton Henethe

    Duende Guest

    While sitting in a puddle Neal scribbled in the mud:
    I feel so alone.:(
    Duende, Nov 26, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.