I've make it with HTML
& CSS
table {
border: 1px solid;
border-collapse: collapse;
}
tr,
th,
td {
border: 1px solid;
padding: 10px;
}
<table>
<thead>
<tr>
<th>Asset \ File</th>
<th>Link</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<th> </th>
<th> </th>
<th> </th>
</tr>
<tr>
<th> </th>
<th> </th>
<th> </th>
</tr>
</tbody>
</table>
But I want to make the first column of the first line divided into two parts (a diagonal line is a straight line segment that joins two corners of a cell) like the image I edited with paint:
to make this style I selected the first th:first-child
based on this Answer
table {
border: 1px solid;
border-collapse: collapse;
}
tr,
th,
td {
border: 1px solid;
padding: 10px;
}
/*diagonal line*/
th:first-child {
background: linear-gradient(
to top right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0) calc(50% - 0.8px),
rgba(0, 0, 0, 1) 50%,
rgba(0, 0, 0, 0) calc(50% + 0.8px),
rgba(0, 0, 0, 0) 100%
);
}
<table>
<thead>
<tr>
<th>Asset \ File</th>
<th>Link</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
Is there are any other method or approach I can build this style without using background with linear-gradient?