如何将按钮放在表外,而不是在表中

时间:2015-04-13 13:54:34

标签: php html css

我正在尝试创建三个按钮,但按钮位于表格内。如何将按钮放在靠近桌子的桌子左侧的桌子旁边?

echo "<table border='1'>
  <tr>
    <th>ItemName</th>
    <th>ItemImage</th>
    <th>ItemDetails</th>
    <th>RentPrice</th>                                  
  </tr>";

while($row = mysql_fetch_array($result))
  {
    echo "<tr>";
    echo "<td><a href='itemdetail.php?itemID=".$row['ItemID']."'>" . $row['ItemName'] . "</td>";
    echo "<td><a href='itemdetail.php?itemID=".$row['ItemID']."'><img src='./images/deals/".$row['ItemImage']."' width='' height='' alt=''></a></td>";
    echo "<td>" . $row['ItemDetails'] . "</td>";    
    echo "<td>" . $row['RentPrice'] . "</td>";
    echo "<td><input type='button' value='Google Map' onclick='window.location.href=<googlemap url here>'>"; 
    echo "<input type='button' value='Google Map' onclick='window.location.href=<googlemap url here>'>"; 
    echo "<input type='button' value='Google Map' onclick='window.location.href=<mailto:anawaz12@student.bradford.ac.uk?Subject=Hello%20again> target='_top''></td>"; 
    echo "</tr>";
  }

 echo "</table>";

 mysql_close($con);

0 个答案:

没有答案