<div class="col-xxxl-6 col-xxl-6 col-xl-6 col-lg-12 col-md-12 col-sm-12 my-3">
<div class="card panel-success panel-border">
<div class="card-heading cardBackground border-light">
<h4 class="card-title float-left">
<i class="livicon" data-name="list-ol" data-size="16" data-loop="true" data-c="#fff"
data-hc="#fff"></i> Tasks
</h4>
@if(user()->hasAccess('taskAdmin.add_task_page'))
<div class="float-md-right">
<a class="btn btn-default btn-sm" href="{{ route('taskAdmin.add_task_page') }}" role="button">New Task</a>
</div>
@endif
</div>
<div class="card-body">
<div class="offset-9 col-md-3 col-sm-3">
<select class="form-control" id="filterTasks" required>
<option value="all" >All Tasks</option>
<option value="today" >Today's Tasks</option>
<option value="overdue" >Overdue Tasks</option>
<option value="incomplete" >To Do Tasks</option>
</select>
</div>
<div>
<h4>
<i class="livicon" data-name="pin-on" data-size="16" data-loop="false" data-c="black"
data-hc="black"></i> Your Tasks
</h4>
</div>
<div>
<table class='tableFix'>
@foreach($myTasks as $task)
<tr @if(Carbon\Carbon::parse($task->due_date)->eq(Carbon\Carbon::today())) class="today"
@elseif(Carbon\Carbon::parse($task->due_date)->lt(Carbon\Carbon::today())) class="overdue"
@elseif($task->status_id == 5) class="complete" hidden
@else class="all" @endif>
<td class="col-md-1">
@if(Carbon\Carbon::parse($task->due_date)->lt(Carbon\Carbon::today()) && $task->status_id != 5)
<i class="livicon" data-name="remove-circle" data-size="16" data-loop="false" data-c="red" data-hc="red"></i>
@else
<i class="livicon" id="taskTick{{$task->id}}" data-name="check-circle" data-size="16" data-loop="false" @if($task->status_id == 5) data-c="#00bc8c" data-hc="#00bc8c" @else data-c="grey" data-hc="grey" @endif></i>
@endif
</td>
<td class="col-md-7">
<a style="color: #337ab7" href="{{ route('tasks.show_task_page', $task->id)}}"> {{ $task->title }} </a>
</td>
<td class="col-md-2 status{{$task->status_id}}" id="taskStatus{{$task->id}}">
<?php
echo status_change_dropdown_for_view($task->id, $task->status->id, $task->status->name, $status_id_list);
?>
</td>
<td class="col-md-2">
<span > {{ Carbon\Carbon::parse($task->due_date)->format('F j') }} </span>
</td>
</tr>
@endforeach
</table>
</div>
<div>
<h4>
<i class="livicon" data-name="tasks" data-size="16" data-loop="false" data-c="black"
data-hc="black"></i> Assigned By You
</h4>
</div>
<div>
<table class='tableFix'>
@foreach($assignedByMeTasks as $task)
<tr @if(Carbon\Carbon::parse($task->due_date)->eq(Carbon\Carbon::today())) class="today"
@elseif(Carbon\Carbon::parse($task->due_date)->lt(Carbon\Carbon::today())) class="overdue"
@elseif($task->status_id == 5) class="complete" hidden
@else class="all" @endif>
<td class="col-md-1">
@if(Carbon\Carbon::parse($task->due_date)->lt(Carbon\Carbon::today()))
<i class="livicon" data-name="remove-circle" data-size="16" data-loop="false" data-c="red" data-hc="red"></i>
@else
<i class="livicon" id="taskTick{{$task->id}}" data-name="check-circle" data-size="16" data-loop="false" @if($task->status_id == 5) data-c="#00bc8c" data-hc="#00bc8c" @else data-c="grey" data-hc="grey" @endif></i>
@endif
</td>
<td class="col-md-7">
<a style="color: #337ab7" href="{{ route('tasks.show_task_page', $task->id)}}"> {{ $task->title }} </a>
</td>
<td class="col-md-2 status{{$task->status_id}}" id="taskStatus{{$task->id}}">
<?php
echo status_change_dropdown_for_view($task->id, $task->status->id, $task->status->name, $status_id_list);
?>
</td>
<td class="col-md-2">
<span > {{ Carbon\Carbon::parse($task->due_date)->format('F j') }} </span>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
谁能看到为什么这两个表的格式与图片所示不同?我在问题中输入的代码对于两个表都是相同的,只是每个表的变量不同。似乎所有内容都在第一张桌子的左侧。
我的帖子主要是代码,但实际上我没有更多可以添加的细节。
* edit我尝试过为每个表使用相同的变量,并且格式相同,因此根据任务变量的内容,它的大小似乎有所变化