Home > Blockchain >  thead background color without border
thead background color without border

Time:10-22

How can I color the entire thead row without these borders?

<thead bgcolor="#d6f5d6">
        <tr className="ha">
          <th>Evento</th>
          <th>Valor</th>
        </tr>
</thead>


table thead tr,
table thead tr th{
    background: #d6f5d6;
    border: 1px solid #d6f5d6;
    background-clip: content-box;
}

table thead tr th{
    border: none;
    background-clip: content-box;
}

enter image description here

CodePudding user response:

You want the border-spacing property.

table {
  border-spacing: 0;
}
table thead tr,
table thead tr th{
    background: #d6f5d6;
    border: 1px solid #d6f5d6;
    background-clip: content-box;
}

table thead tr th{
    border: none;
    background-clip: content-box;
}
<table>
  <thead bgcolor="#d6f5d6">
    <tr className="ha">
      <th>Evento</th>
      <th>Valor</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>one</td>
      <td>two</td>
    </tr>
    <tr>
      <td>three</td>
      <td>four</td>
    </tr>
  </tbody>
</table>

  •  Tags:  
  • css
  • Related