'Problems with making this table
I have tried to make a html table but can really figure out how to make it look like this(image). i cant figure out the css
Can anybody help?picture of the table im trying to make
Solution 1:[1]
table {
border-collapse: collapse;
}
td,
th {
padding: 1rem;
border-width: 3px;
}
td {
border-right-style: dashed;
}
td:last-child {
border-right-style: solid;
}
td:nth-last-child(-n+2),
th:nth-last-child(-n+2) {
background: #ddd;
}
tr:first-child td {
border-top-style: solid;
}
tr:last-child td {
border-bottom-style: solid;
}
td:nth-child(2) {
border-left-style: solid;
}
<table>
<thead>
<tr>
<th></th>
<th>Mandag</th>
<th>Tirsdag</th>
<th>Onsdag</th>
<th>Torsdag</th>
<th>Fredag</th>
<th>Lordag</th>
<th>Sondag</th>
</tr>
</thead>
<tbody>
<tr>
<th>Carlo</th>
<td>Fodbold</td>
<td>Panfojte</td>
<td>Fodbold</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th>Gitte</th>
<td></td>
<td>Basket</td>
<td></td>
<td></td>
<td>Basket</td>
<td></td>
<td></td>
</tr>
<tr>
<th>Anne</th>
<td></td>
<td></td>
<td>Sang</td>
<td>Handbold</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DvdRom |
