...

View Full Version : firefox webform problem



graziano
05-28-2007, 06:59 PM
Hello

Anyone can explain me why following 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
http://www.uploadtr.net/thumbs/561028ie7.jpg (http://www.uploadtr.net/viewer.php?id=561028ie7.jpg)

while on firefox shows this ?
http://www.uploadtr.net/thumbs/81533firefox.jpg (http://www.uploadtr.net/viewer.php?id=81533firefox.jpg)

Thanks!

koyama
05-28-2007, 08:04 PM
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


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:


<!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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum