-1

I am inserting border on a th inside of tr but it's not applying the border. My code

<tr class="shipping">
<th>Shipping 2</th>
<td data-title="Shipping 2">
                <p>There are no shipping methods available. Please check your address or contact us if you need any help.</p>

                <p class="woocommerce-shipping-contents"><small>Military Grade Paracord Kit ×1</small></p>      
        </td>

and css is

tr {
    border-top: 9px solid red;
   }
Raktim Biswas
  • 4,011
  • 5
  • 27
  • 32
uixpider
  • 81
  • 1
  • 11
  • 2
    Possible duplicate of [Add border-bottom to table row ](http://stackoverflow.com/questions/10040842/add-border-bottom-to-table-row-tr) – yuriy636 Aug 11 '16 at 19:25

2 Answers2

0

If you wanna set a border of a tr element you should set the border-collapse of the table to collapse:

table {
  border-collapse: collapse
}
tr {
    border-top: 9px solid red;
}
<table>
  <tr class="shipping">
    <th>Shipping 2</th>
    <td data-title="Shipping 2">
      <p>There are no shipping methods available. Please check your address or contact us if you need any help.</p>
      <p class="woocommerce-shipping-contents"><small>Military Grade Paracord Kit ×1</small></p>      
    </td>
  </tr>
</table>
Dekel
  • 60,707
  • 10
  • 101
  • 129
0

you can try this:

tr > th {
    border-top: 9px solid red;
}
SRK
  • 1
  • 2