extra vertical space WITHIN form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mappo

    extra vertical space WITHIN form

    There are about a million posts on how to get rid of the extra space _after_ the
    form end-tag, but I can't find any that solve my problem: extra space _in_ the
    form tag.

    I have a table nestled inside the form and since I want the submit button
    underneath the input text field i have a br tag to separate them. For some
    reason IE5.5 gives me what seems like two br tags. It looks good in Opera 7,
    and in K-Meleon 0.6 (Gecko).
  • Brian

    #2
    Re: extra vertical space WITHIN form

    mappo wrote:[color=blue]
    > There are about a million posts on how to get rid of the extra space _after_ the
    > form end-tag, but I can't find any that solve my problem: extra space _in_ the
    > form tag.[/color]

    using css, by setting padding and margin.
    [color=blue]
    > I have a table nestled inside the form and since I want the submit button
    > underneath the input text field i have a br tag to separate them. For some
    > reason IE5.5 gives me what seems like two br tags. It looks good in Opera 7,
    > and in K-Meleon 0.6 (Gecko).[/color]

    url?

    --
    Brian
    follow the directions in my address to email me

    Comment

    • mappo

      #3
      Re: extra vertical space WITHIN form

      > using css, by setting padding and margin.
      I set margin bottom to 0, but that only helped between the form and the rest
      of the page, not insode the form
      [color=blue]
      > url?[/color]

      Comment

      • Brian

        #4
        Re: extra vertical space WITHIN form

        You didn't quote much, so others might find this message a bit arcane.
        Let's see if I can stick in some context:

        url: http://www.ing.umu.se/~id01mht/

        mappo wrote:[color=blue]
        > There are about a million posts on how to get rid of the extra
        > space _after_ the form end-tag, but I can't find any that solve my
        > problem: extra space _in_ the form tag.[/color]
        [color=blue][color=green]
        >> using css, by setting padding and margin.[/color]
        >
        > I set margin bottom to 0, but that only helped between the form and
        > the rest of the page, not insode the form[/color]

        You can also set margins on input, textarea, etc.
        [color=blue]
        > I have a table nestled inside the form[/color]

        No, you have forms nestled inside table cells.
        [color=blue]
        > and since I want the submit button underneath the input text
        > field i have a br tag to separate them.[/color]

        You don't need the br element. Use display: block for input element.
        Set margin: auto to center block level items. Since MSIE/Win
        doesn't get this, also set text-align: center for from element.
        [color=blue]
        > For some reason IE5.5 gives me what seems like two br tags.[/color]

        Sounds like a bug in IE 5.5.

        I looked at your code. That's not tabular data. Don't use tables for
        layout. And KISS (keep it simple, stupid).

        /* css */

        form {
        text-align: center ; /* hack so MSIE centers */
        float: left ;
        width: 12em ;
        }
        input {
        display: block ;
        margin: auto ;
        }

        <!-- html -->
        <form action="http://www.google.com/search" method="get" target="_blank" >
        <input type="Text" name="q" size="27" maxlength="255" value="">
        <input type="submit" name="btnG" value="Google">
        </form>
        <form name="imdb" method=post action="http://www.imdb.com/Find"
        target="_blank" >
        <input type=hidden name=select value="All">
        <input type=text name="for" size="27">
        <input type="submit" value="IMDb">
        </form>
        <form name="biblan"
        action="http://katalog.bibliot ek.umea.se/opac/sv/opac/main.asp"
        method="get" id="sok_fritext " target="_blank" >
        <input type="text" name="TextFrite xt" size="27" maxlength="100"
        value="">
        <input type="submit" value="Ume&arin g; St.bibl." id=submit1
        name=submit1>
        </form>
        <!-- etc. -->


        wfm, MSIE 5.0/Win. Also works in O7 and Moz 1.3. That's all you
        need. You don't need the br element. And you don't need a table to
        lay out the forms. And the code is much simpler. In fact, if it
        weren't for the line wrapping, it'd be even prettier. :-)

        BTW, lose the target="_blank" nonsense. Your users can figure out how
        to open a new window if they want.

        --
        Brian
        follow the directions in my address to email me

        Comment

        • Brian

          #5
          Re: extra vertical space WITHIN form

          mappo wrote:[color=blue]
          >
          > I set margin bottom to 0, but that only helped between the form and the rest
          > of the page, not insode the form
          >[color=green]
          >>url?[/color]
          >
          > http://www.ing.umu.se/~id01mht/[/color]

          I just noticed that you didn't quote all of your attributes in the
          form. You should. Note that I copied your form code from your page,
          but didn't correct this (I didn't see it before posting my reply). If
          you copy my code into your document, don't forget to fix this.

          --
          Brian
          follow the directions in my address to email me

          Comment

          Working...