My goal is to create a table with a leftmost header column that has no border, but is still part of the table.
In my attempt to achieve this, I used the following HTML code:
<table class="my-table" style="border-left: 0">
<tr>
<td style="border-left: 0;border-top: 0; border-bottom: 0">x</td>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td style="border-left: 0;border-top: 0; border-bottom: 0">f(x)</td>
<td>1</td>
<td>4</td>
<td>9</td>
</tr>
</table>
I also included the following CSS:
table.my-table {
border-collapse: collapse;
border: 1px solid grey;
}
table.my-table td {
border: 1px solid grey;
padding: 0 0.5em;
text-align: center;
}
Although I provided the above code, the upper and lower borders for column 1 are still appearing as shown here: https://i.sstatic.net/CETVY.png
I am aware that I can use two tables with absolute sizes as a workaround, but I am wondering if there is a more elegant solution using just one table?