我有table
thead
这个html bootstrap tbody
这是我的代码
<table border='1' class='table table-responsive' dir='rtl'>
<thead>
<tr>
<td colspan='6'>
<span style='margin-right:50px;' class='pull-right'>شركة مصطفى الشرباتي وشركاه</span>
<span style='margin-left:50px;' class='pull-left'>شركة مصطفى الشرباتي وشركاه</span>
</td>
</tr>
<tr>
<td colspan='6'>
<span class='pull-right'><small> التاريخ 3-1-2018</small></span>
<span class='pull-left'><small><div id="print-foot">
صحفة:
</div></small></span>
</td>
</tr>
<tr>
<td colspan='3'><u>كشف الذمم العامة بالمجاميع</u></td>
<td colspan='3'><u>اسم المنطقة {{$city->city_name}} رمز المنطقة {{$city->id}}</u></td>
</tr>
<tr>
<td colspan='6' style='text-align: center;'>من تاريخ {{$request->fromDate}} الى تاريخ {{$request->toDate}}</td>
</tr>
<tr>
<td>اسم العميل</td>
<td>رقم العميل</td>
<td>الرصيد المدور</td>
<td>مدين</td>
<td>دائن</td>
<td>الرصيد</td>
</tr>
</thead>
<tbody>
@php $total = 0;$first_total = 0; $debt_total= 0; $total_re =0 ;@endphp
@foreach($customers as $customer)
<tr>
<td>{{$customer->customer_name}}</td>
<td>{{$customer->id}}</td>
<td>
{{round($customer->getVouchers->where('voucher_date','<',$request->fromDate)->sum('voucher_amount'),3)}}
@php $first_total+= $customer->getVouchers->where('voucher_date','<',$request->fromDate)->sum('voucher_amount')@endphp
</td>
<td>
{{
round($customer->getVouchers()->
where('voucher_amount','>',0)->
whereBetween('voucher_date',[$request->fromDate,$request->toDate])->
sum('voucher_amount'),3)
}}
@php $debt_total += $customer->getVouchers()->
where('voucher_amount','>',0)->
whereBetween('voucher_date',[$request->fromDate,$request->toDate])->
sum('voucher_amount') @endphp
</td>
<td>
{{
round($customer->getVouchers()->
where('voucher_amount','<',0)->
whereBetween('voucher_date',[$request->fromDate,$request->toDate])->
sum('voucher_amount'),3) * -1
}}
@php $total_re += $customer->getVouchers()->
where('voucher_amount','<',0)->
whereBetween('voucher_date',[$request->fromDate,$request->toDate])->
sum('voucher_amount') @endphp
</td>
<td>
@if($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount') > 0)
{{round($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount'),3)}} م
@php $total+= round($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount'),3) @endphp
@elseif($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount') < 0)
{{round($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount'),3) * -1}} د
@php $total+= round($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount'),3) @endphp
@elseif($customer->getVouchers->where('voucher_date','<=',$request->toDate)->sum('voucher_amount') == 0)
0 د
@endif
</td>
</tr>
@endforeach
<tr>
<td colspan='2'>المجموع</td>
<td>{{round($first_total,3)}} م</td>
<td>{{round($debt_total,3)}} م</td>
<td>{{round($total_re,3) * -1}} د</td>
<td>
@if($total > 0)
{{round($total,3)}} م
@else
{{round($total,3) * - 1}} د
@endif
</td>
</tr>
</tbody>
</table>
从thead
移除边框,让tbody
中的边框非常感谢
答案 0 :(得分:2)
这是有用的东西......希望它有所帮助。
<title>Untitled Document</title>
<style>
table {border-collapse: collapse; width: 100%; direction: rtl;}
thead {border: 1px solid white;}
thead th {border: 1px solid black;}
thead td {border: 1px solid white;}
tbody td {border: 1px solid black; width: 15%;}
.r-padded {padding: 10px 0;}
.l-padded {padding: 10px 0; text-align: left;}
.c-padded {padding: 15px 0; text-align: center; border-bottom: 1px solid black;}
</style>
</head>
<body>
<table class='table table-responsive'>
<thead>
<tr>
<td colspan='3' class='r-padded'>شركة مصطفى الشرباتي وشركاه </td>
<td colspan='3' class="l-padded">شركة مصطفى الشرباتي وشركاه </td>
</tr>
<tr>
<td colspan='3' class="r-padded"><small> التاريخ 3-1-2018</small></td>
<td colspan='3' class="l-padded"><small><div id="print-foot"> صحفة: </div></small></td>
</tr>
<tr>
<td colspan='3' class="r-padded"><u>كشف الذمم العامة بالمجاميع</u></td>
<td colspan='3' class="l-padded"><u>اسم المنطقة city_name رمز المنطقة id</u></td>
</tr>
<tr>
<td colspan='6' class="c-padded">من تاريخ fromDate الى تاريخ toDate</td>
</tr>
<tr>
<th>اسم العميل</th>
<th>رقم العميل</th>
<th>الرصيد المدور</th>
<th>مدين</th>
<th>دائن</th>
<th>الرصيد</th>
</tr>
</thead>
<tbody>
<!-- table code continues -->
答案 1 :(得分:1)
tbody tr td {
border: 1px solid #000;
}
table {
border-spacing: 0px;
}
这应该做。 从顶行删除border ='1'。