I have a HTML table that is made out of 2 colgroup
s with each their own "children" columns.
How do I apply a border to the colgroup
only?
Here what I've tried
#table {
border-collapse: collapse;
}
#tableCol1 {
border-left: 20px solid green;
background-color: red;
}
<table class="table table-striped" id="table">
<colgroup>
<col span="1">
</colgroup>
<colgroup>
<col span="3" class="tableColGroup" id="tableCol1">
</colgroup>
<colgroup>
<col span="5" class="tableColGroup" id="tableCol2">
</colgroup>
<thead>
<tr>
<th scope="colgroup" colspan="1"></th>
<th scope="colgroup" colspan="3">Basic</th>
<th scope="colgroup" colspan="5">Extra</th>
</tr>
<tr>
<th scope="col">Day</th>
<th scope="col">OH</th>
<th scope="col">ENG</th>
<th scope="col">TEK</th>
<th scope="col">ATV</th>
<th scope="col">BV</th>
<th scope="col">100%</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mo.</th>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th scope="row">Tu.</th>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<th scope="row">We.</th>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</tbody>
</table>
This is the result I am looking for
As you can see the green border is also applied to the individual cells, how do I solve this?