html - 如何将它合并到一张表中?

标签 html css

如何在 1 中合并表格?我的输出是这样的。我不能结合它太伤心了。有什么建议吗?

<table class="header-table" style="width:100%">
        <tr>
          <td><b>Drop</b> : {{$value['sequence_id']}}</td>
          <td><b>Route Code</b> : {{$value['route_no']}}</td>
          <td><b>Route Name</b> : {{$route_name}}</td>
        </tr>
</table>
                <?php
                    $getVsr = \App\Modules\Entities\VSR\VSR::where('route_no',$value['route_no'])->get();
                    // dd($getVsr);
                ?>
<table style="width:100%">
    <tr>
      <th>&nbsp;</th>
      <th>ENV</th>
      <th>VSR NO.</th>
      <th>BOX/BDL</th>
      <th>SEAL NO.</th>
      <th>PADLOCK NO.</th>
      <th>DEST-ATA</th>
      <th>DEST-ATD</th>
      <th>REMARKS</th>
      <th>RECEIVED BY/DATE</th>
    </tr>
    @foreach($getVsr as $vsrVal)
    <tr>
      <td></td>
      <td>{{$vsrVal['env']}}</td>
      <td>{{$vsrVal['vsr_no']}}</td>
      <td>{{$vsrVal['vsr_no']}}</td>
      <td>{{$vsrVal['seal_no']}}</td>
      <td>{{$vsrVal['padlock_no']}}</td>
      <td>________</td>
      <td>________</td>
      <td>________</td>
      <td>________</td>
    </tr>
    @endforeach
</table>

我的 table 不好。有什么想法吗?

最佳答案

添加另一个 tr 并在其中添加一个 colspan 为 3 的 td,然后您可以在此 td 中放置另一个表

<table class="header-table" style="width:100%">
        <tr>
          <td><b>Drop</b> : {{$value['sequence_id']}}</td>
          <td><b>Route Code</b> : {{$value['route_no']}}</td>
          <td><b>Route Name</b> : {{$route_name}}</td>
        </tr>
        <tr>
          <td colspan="3">
            <table>...</table>
          </td>
         </tr>
</table>

关于html - 如何将它合并到一张表中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56286710/

相关文章:

css - 如何在 Chrome 的检查器中添加/插入伪元素之前或之后?

mysql - 从特定 div 的 sql 数据库更改 css 背景

html - 为什么 Flash 在 IE 中不显示

java - XPath:根据以下元素中的文本选择元素?

javascript - 在 jQuery 的匿名函数中将 HTML5 数据写入 JSON

css - 完整的封面背景图片问题

html - 如何在 bootstrap 上使用 HTML 创建固定页脚

javascript - 如何测量表格行高(以像素为单位)

javascript - 如何更换 Cordova 主页?

html - Bootstrap 使一列等于两列的高度