I am working with a table and here is the code for it:
<table>
<thead>
<tr>
<th style="width: 40%; text-align: center; vertical-align: center;">Nr.<br> crt.</th>
<th style="font-weight: bold; width: 210%; height: 25; text-align: center; vertical-align: center;">Asistent</th>
<th style="font-weight: bold; width: 210%; height: 25; text-align: center; vertical-align: center;">Ambulantier</th>
<th style="text-align: center; vertical-align: center;">Ambulanta</th>
@foreach($dates as $date)
@if($date['day_name'] == 'S' || $date['day_name'] == 'D')
<th style="width: 40%; text-align: center; vertical-align: center; font-weight: bold; color: red;">{{$date['day']}}<br> {{$date['day_name']}}</th>
@else
<th style="width: 40%; text-align: center; vertical-align: center; font-weight: bold;">{{$date['day']}}<br> {{$date['day_name']}}</th>
@endif
@endforeach
</tr>
</thead>
<tbody>
@foreach($interventions as $intervention)
<tr>
<td>0</td>
<td>{{$intervention->employee_one->name}}</td>
<td>{{$intervention->employee_two->name}}</td>
<td></td>
</tr>
@endforeach
</tbody>
</table>
When this code runs, it produces the output shown in this screenshot: https://i.stack.imgur.com/4Hsun.png
I've noticed that some numbers in the header are displayed in red. My question is, how can I make the entire column red if the respective <th>
is also red?
One solution I consider is using JavaScript, which could look like this (just a concept, not the actual code):
if(header(current_td).hasProperty('color: red')) {
apply(color.red);
}
Any ideas on how to achieve this effect?