HTML表格在顶部生成重复的边框线条

时间:2016-03-01 08:58:44

标签: html css html5

为什么我的表格会在顶部生成重复的边框线

<table style="width:100%" border="1">
  <tr>
    <td>Car detail</td>
  </tr>
<?php do { ?>
    <tr>  
      <td>
      <?php echo $row_Recordset1['make']; ?> 
      <?php echo $row_Recordset1['carmodel']; ?> 
      <?php echo $row_Recordset1['car_number']; ?>
     </td>   
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

结果: enter image description here

2 个答案:

答案 0 :(得分:1)

表格中可能有空行

答案 1 :(得分:1)

&#34;双边界&#34;是标准外观,并带有border =&#34; 1&#34;你设置边框的线宽。在这种情况下,你需要的是&#34; border-collapse:collapse&#34;,这将导致一个单行边框。

您可以在此处找到更多详细信息:http://www.w3schools.com/css/css_table.asp

相关问题