How does css nth-child make the fourth line not have a bottom line?

.table_upgrade_works
{
  width: 100%;
  border-collapse: collapse;
}
.table_upgrade_works td {
  table-layout: fixed;
  word-break: break-all;
  border-bottom: 1px solid -sharpccc;
  font-size: 13px;
  text-align: center;
}
.table_upgrade_works td :nth-child(4){
  border-bottom: 1px solid -sharpfff;
}

there are four bottom lines in total
, but I want the fourth bottom line not to show
this doesn"t work

Mar.07,2021

Select the cell in column 4

.table_upgrade_works tr :nth-child(4) { }

Select the cell in row 4

.table_upgrade_works tbody :nth-child(4) td { }

examples are as follows

<html>
    <head>
        <style type="text/css">
.table_upgrade_works
{
    width: 100%;
    border-collapse: collapse;
}
.table_upgrade_works td {
    table-layout: fixed;
    word-break: break-all;
    border-bottom: 1px solid -sharpccc;
    font-size: 13px;
    text-align: center;
}
.table_upgrade_works tbody :nth-child(4) td {
    border-bottom: 1px solid -sharpfff;
}
        </style>
    </head>
    <body>
        <table class="table_upgrade_works">
            <thead>
                <tr>
                    <th>one</th>
                    <th>two</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>1</td>
                    <td>2</td>
                </tr>
                <tr>
                    <td>10</td>
                    <td>20</td>
                </tr>
                <tr>
                    <td>1</td>
                    <td>2</td>
                </tr>
                <tr>
                    <td>10</td>
                    <td>20</td>
                </tr>
                <tr>
                    <td>10</td>
                    <td>20</td>
                </tr>
            </tbody>
        </table>
    </body>
</html>
< hr >

reference

https://www.w3schools.com/css.


:nth-child(4n)
Menu