我面对内联数据表的问题,我想在一行中显示所有操作。我尝试了内联CSS,但没有结果。请帮助,如果有可能,我附上数据表的图片和我的代码。谢谢
这是我的代码,其中我使用foreach循环以表格形式显示来自控制器的所有数据,问题出在最后一个<td>
。
<div class="panel-body table-responsive">
<table class="table table-striped table-bordered" id="table">
<thead>
<tr class="filters">
<th>Voucher#</th>
<th>Created Date</th>
<th>Package</th>
<th>Mautamer's Name</th>
<th>Mautamer's Passport</th>
<th>Created By</th>
<th> Actions </th>
</tr>
</thead>
<tbody>
@foreach($vouchers as $voucher)
<tr>
<td>{{$voucher->id}}</td>
<td >{{$voucher->created_date}}</td>
<td >{{$voucher->package_name}}</td>
<td>{{$voucher->name}}</td>
<td>{{$voucher->passport_no}}</td>
<td>{{$voucher->created_by}}</td>
<td style="display:inline">
<a href="{{route('voucher.show', $voucher->id)}}"> <i class="livicon" data-name="info" data-size="18" data-loop="true" data-c="#428BCA" data-hc="#428BCA" title="view" style='display:inline'></i></a>
<a href="{{route('voucher.edit', $voucher->id)}}"><i class="livicon" data-name="edit" data-size="18" data-loop="true" data-c="#428BCA" data-hc="#428BCA" title="edit " style='display:inline'></i></a>
<form method="{{route('voucher.destroy', $voucher->id)}}" action="" style='display:inline'>
@method('Delete')
<button type="submit"><i class="livicon" data-name="user-remove" data-size="18" data-loop="true" data-c="#f56954" data-hc="#f56954" title="delete"></i></button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
答案 0 :(得分:0)
将nowrap添加到具有按钮的td中。并给它们一些宽度。
<td style="display:inline" nowrap>