Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2004
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    firefox webform problem

    Hello

    Anyone can explain me why following code

    Code:
    <br>
        <table cellPadding="4" align="center">
    		    <tr  bgcolor="#699999">
    			<td>TEST1</td>
                <td>TEST2</td>
    			<td >
    			<form method="POST" action="TEST.PHP" >
          		<input type="submit" value="BUTTON" name="stop">
    			</td>
    			</form>
    		</tr>
    	</table>
    on ie7 works fine showing this


    while on firefox shows this ?


    Thanks!

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by graziano View Post
    Anyone can explain me why following code on ie7 works fine showing this [...] while on firefox shows this? [...]
    The gap is due to the forms margin. You can eliminate it using
    Code:
    form {
      margin: 0;
    }
    The rules in Firefox for when a form has a top/bottom margin are a bit complicated. But they only have a margin in Firefox's quirks mode.

    So I suspect that you haven't specified a document type. Maybe this one is the right one for you to use:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/REC-html40/strict.dtd">
    As a side issue, you have a nesting error. You need to put your closing form tag before the closing td tag. Without the nesting error you would have had the same gap in IE.

    Run your code through the validator. It will catch such errors.


  •  

    Posting Permissions

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