1

I have the next HTML code:

<table>
    <tbody>
        <tr>
          <td>text 1</td>
          <td>text 2</td>
          <td>text 3</td>
          <td>
              <a href="http://xxxxx/xxxxxxx/index.php?route=extension/pay/andwallet&amp;token=xxxxx" class="btn btn-primary" ><i class="fa fa-pencil"></i></a>
              <a href="http://xxxxx/xxxxxxx/index.php?route=extension/extension/pay/uninstall&amp;token=xxxxxx&amp;extension=andwallet" class="btn btn-danger" ><i class="fa fa-minus-circle"></i></a>
            </td>
        </tr>
    </tbody>
</table>    

I'm not allowed to modify the html, but I need to add a style to the TR.

I need a CSS selector to be able to modify the TR, based on the fact that the href will always contain the word "wallet"

I was thinking something like this:

div#extension tr:has(td > a[href*="wallet"]){
    background-color: yellow;
}

div#extension tr > td > a[href*="wallet"]::parent{
    background-color: yellow;
}   

but neither of the two forms works for me, if someone can help me please..

0 Answers0