Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

Form mesing with table cell

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Form mesing with table cell

Postby markyboy17 » Tue Feb 14, 2012 1:54 am

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: Select all
                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.
markyboy17
New php-forum User
New php-forum User
 
Posts: 14
Joined: Mon Jan 09, 2012 1:11 am

Re: Form mesing with table cell

Postby egami » Tue Feb 14, 2012 6:31 am

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.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Form mesing with table cell

Postby markyboy17 » Tue Feb 14, 2012 7:56 am

egami wrote: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.
markyboy17
New php-forum User
New php-forum User
 
Posts: 14
Joined: Mon Jan 09, 2012 1:11 am

Re: Form mesing with table cell

Postby markyboy17 » Tue Feb 14, 2012 8:00 am

egami wrote: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.
markyboy17
New php-forum User
New php-forum User
 
Posts: 14
Joined: Mon Jan 09, 2012 1:11 am


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.