How to eliminate a space produced by closing </form> tag?

Discussion in 'HTML & Website Design' started by Thailand_for_YOU, Jul 16, 2008.

  1. #1
    I have a search on my page produces by <form...> and </form> tags. There is a white space below the search <INPUT TYPE="Text"> slot.
    How to bring the next page element like a table or <hr> tag to eliminate that space?

    Example:
    1. Current position:

    <form><INPUT TYPE="Text"></form><hr>
    2008-07-17_004353.gif

    2. Desired position

    <form><INPUT TYPE="Text"><hr></form>
    2008-07-17_004528.gif

    ----
     
    Thailand_for_YOU, Jul 16, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    The graphics didn't work for me, but you can just style the form tags and remove padding and margin: <form style="padding: 0px; margin: 0px;" ...>
     
    itcn, Jul 16, 2008 IP
  3. Thailand_for_YOU

    Thailand_for_YOU Guest

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thailand_for_YOU, Jul 16, 2008 IP
  4. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't see your form but i may be blind... add an id to the field and set a css width for it.
     
    007c, Jul 17, 2008 IP
  5. wdillsmith

    wdillsmith Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Forms by default add white space after them (at least in IE). Try this: <form style="display: inline; margin: 0;">
     
    wdillsmith, Jul 17, 2008 IP
  6. easyrepo

    easyrepo Peon

    Messages:
    159
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Best suggestion i have for you is to put a table inside of a form. For example:
    <form>
    <table>
    <tr>
    <td>text/etc here</td>
    </tr>
    </table>
    </form>

    You can then also format the table to make sure there are no margin spaces/padding/borders etc.
     
    easyrepo, Jul 17, 2008 IP
  7. js09

    js09 Peon

    Messages:
    232
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    negative margin for whatever is under the forum
     
    js09, Jul 17, 2008 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I've never had extra white space in my forms, not even in IE.

    I don't see any form on the linked site, though. If there's extra space going on, there's something wrong with your code-- closing form tags should not be creating any whitespace for any reason.
     
    Stomme poes, Jul 17, 2008 IP
  9. Thailand_for_YOU

    Thailand_for_YOU Guest

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It took me some playing around with the code, but finally, I get what I wanted.

    Thanks again to ITCN.

    For those that don't see the FORM - it is simply because I'm referring to code <FORM>...</FORM> and not to the forms (that need to be filled) on the page.

    Anyhow, to see what it's about, just take a look at the top portion of my pages:
    http://www.th4u.com/thailand.htm
    http://www.th4u.com/toughladies.htm
     

    Attached Files:

    Thailand_for_YOU, Jul 18, 2008 IP
  10. Cri2T

    Cri2T Peon

    Messages:
    104
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Same here.


    I'm thinking you might have a typo in one of the close tags (IE: "</from>" instead of "</form>") Also, don't capitalize them (IE: <form>...</form> instead of <FORM>...</FORM>). Hope you get it sorted out.
     
    Cri2T, Jul 18, 2008 IP
  11. DavidMalton

    DavidMalton Member

    Messages:
    123
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #11
    Hey thanks for this thread. I was having this problem yesterday but the form was breaking up my tables and my images. Your answers here helped me out?

    Thanks
     
    DavidMalton, Jul 18, 2008 IP