Results 1 to 7 of 7

Thread: </form> problem

  1. #1
    Join Date
    Feb 2005

    </form> problem

    I have a form in a small table cell (<td>) and if I end it by using </form> it puts a <br> in the code or something of the sort because it screws up the rest of the table cells. I don't know why it does it and I know the problem only occurs in IE and not Firefox.

    Here's my code:

    <td class="t_bar2" height="30" width="145">&nbsp;</td>
    <td height="30"><img src="images/t_logo.jpg"><img src="images/t_cross.jpg"></td>
    <td class="t_panel"><form method='POST' action='login.html'>
    Username <input class='t_form' type='text' name='username'>
    Password <input class='t_form' type='password' name='password'>
    <input class='t_form' type='submit' value='Submit'>
    <a href=regisert.html>Register</a></form></td>
    Last edited by djcubez; 07-15-2005 at 06:27 PM.

  2. #2
    Join Date
    Jul 2005
    I'm not even sure if you need to have </form> at the end, i think it screws it up because it isnt needed.

  3. #3
    Join Date
    Nov 2003
    That is common bug in forms
    just put </form> after </td> or even after </tr>

  4. #4
    You can also use css:


    I'm not sure about older browsers, but it usually works for newer browsers.

    Samdaxs' advice will work perfectly as well.

  5. #5
    Join Date
    May 2004
    Pflugerville, TX
    Eliminating the end tag all together is a very poor idea, as some browsers will choke on the page when trying to submit form contents, and should you ever have more than one form element on the page at one time, you'll throw everything for a loop.

    If you go with samdax's solution, make sure that ending tag is outside of the </table> tag, and move the opening tag to the front of the <table> tag.

    The best method though is orgul's.
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  6. #6
    Yeah, as a coding standard, you should always end your tags.
    Also, it is a good idea to use the slash at the end of the <input> tag, like:

    <input type="text" name="blah" />

    For the <input> has no ending tag (such as </input>). Just some more advice.

  7. #7
    the_pm: checking out your forum, going to sign up ::cheers::

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts