Fit width to border of an element

1

How can I make the black line not fill the entire width of the tr element? I would like to decrease a little thing from the left but with border-width the behavior is another.

<tbody>
  <tr class="has-separator">
     <td colspan="2">
        <div class="circle"></div>
            <span>Mês</span>
     </td>
     <td>Nome do curso</td>
     <td>Data do curso</td>
  </tr>
  <tr>
     <td></td>
     <td>Nome do curso</td>
     <td>Data do curso</td>
  </tr>

  <tr class="has-separator">
     <td colspan="2">
        <div class="circle"></div>
           <span>Mês</span>
     </td>
     <td>Nome do curso</td>
     <td>Data do curso</td>
  </tr>
  ...

The CSS:

table tbody tr:not(:first-child)[class="has-separator"] {
    border-top: 1px solid black;
}

    
asked by anonymous 03.03.2017 / 16:10

1 answer

1

Try to put CSS like this:

table tbody tr:not(:first-child)[class="has-separator"]::after {
    content:" ";
    display: block;
    margin: 0px;
    border-top: 1px solid black;
    background: none;
    width: 100%; /*aqui vc coloca o tamanho que quer que ocupe*/
}
    
03.03.2017 / 17:29