Form mesing with table cell

A

Anonymous

Guest
Hi the code bellow is a table i created in php and i looks great in Chrome and Firefox but in Ie it looks awful.
The problem is where the form is created it is making a gap underneath the button inside the cell therefore stretching the whole row height so it matches. My question is what is wrong with the html that it works in Chrome and Firefox but not IE. BTW dont worry about the css i have removed it and it still looks good in Chrome But Not in IE so its not that

Code:
                echo "<table border='1px' id='SearchTable' cellspacing='0px' cellpadding='0'>
<tr>
<th width='200px'>OrderID</th>
<th width='200px'>Purchase Order Number</th>
<th width='140px'>Date</th>
<th width='140'>Account Number</th>
<th width='140'>Supplier Name</th>
<th width='140'>TradingPartnerID</th>
</tr>";
                    try {
                    while ($oresultset = sqlsrv_fetch_array($oresults)) {
                        echo "<tr>";
                        echo "<form action='ExpandOrders.php' method='POST' id='blaa'>";
                        echo "<td>" . $oresultset['OrderID'] . "</td>";
                        echo "<td>" . $oresultset['DocumentNumber'] . "</td>";
                        echo "<td>" .date('d-M-Y',  strtotime($oresultset['DocumentDate'])) . "</td>";
                        echo "<td>" . $oresultset['AccountNumber'] . "</td>";
                        echo "<td>" . $oresultset['Supplier'] . "</td>";
                        echo "<td>" . $oresultset['TradingPartnerID'] . "</td>";
                        echo "<td>";
                        echo "<form action='ExpandOrders.php' method='POST' id='blaa' readonly='readonly'>";
                        echo "<input type='hidden' name='OrderExpandID' value='".$oresultset['OrderID']; echo "'>";
                        echo "<input type='submit' value='View Order' allign='Center'>";
                        echo "</form>";
                        echo "</td>";
                        echo "</form>";
                        echo "</tr>";
                    }
                    echo "</table>";
                    
                }
 catch (Exception $e){
     echo 'Message: ' .$e->getMessage();
 }


Thanks in advance.
 
putting form tags inside a table tag isn't recommended..

But, what you can do, is set the padding and margin style tags to 0 on the form, and that should resovle your problem.
 
egami said:
putting form tags inside a table tag isn't recommended..

But, what you can do, is set the padding and margin style tags to 0 on the form, and that should resovle your problem.
Hi thanks for the reply but that hasn't worked either :( .
any other suggestions.
 
egami said:
putting form tags inside a table tag isn't recommended..

But, what you can do, is set the padding and margin style tags to 0 on the form, and that should resovle your problem.

Just discovered its the button thats stretching the cell is there padding or anything for a submit button.
 
Back
Top