</form> tag causes white space in my layout

Posted on 2004-11-27
Last Modified: 2008-03-04
I'm trying to get a form to be totally contained in a table cell.  The only problem is, whenever I add the close form tag (</form>), IE automatially inserts a set amount of white space below the form.  Even if I set the height of the cell explicitly, it is still overridden by this close form tag.  Any ideas?
Question by:siteup
    LVL 10

    Expert Comment

    If possible, we'd need to see the page (a link).  Or at least, just the code for the page.  This isn't normal behavior, so something must be going on.


    Author Comment


    <form method="POST" action="foo.php">
          <p><input type="text" name="T1" size="20"><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    <table border="1" width="100%">
                <td width="619">
                <form method="POST" action="foo2.php">
                      <p><input type="text" name="T2" size="20"><input type="submit" value="Submit" name="B3"><input type="reset" value="Reset" name="B4"></p>



    Author Comment

    the first form has no white space below it.  if you look at the form in the table, it does.  but if you take out the </form> tag from the one in the table, the white space goes away. . .but then of course the form doesn't work properly.
    LVL 27

    Accepted Solution

    try adding style="display:inline;" in your form tag, eg:

      <form method="POST" action="foo2.php" style="display:inline;">

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now