0

I have an HTML table, for example:

    <table>
     <tr>
      <td style="background-color:red;">
       qwertz
      </td>
     </tr>
    </table>

This table, is in a cell () of another table, as it have information in colors.

The parent table got a listener in js or CSS (I don't know) which changes the background-color to one color, when you hover (mouseover).

That's pretty bad, as you can't see the table information then - but right, for the whole line.

So at the end it's this.

    <table>
    <tr><td>Blabla</td><td>Blabla</td>
    <td>
    ----
    <table>
     <tr>
      <td style="background-color:red;">
       qwertz
      </td>
     </tr>
    </table>
    ----
    </td></tr></table>

How can I prevent, that the style changes on mousehover, when I don't have access to the CSS or js file? (don't ask..)

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
  • The short answer is: you can't. The long answer is: you can try to make it harder, but it will just be an arms race, which will end with the party wielding JavaScript winning. – Heretic Monkey Dec 14 '20 at 18:53
  • Take a look at this question [link](https://stackoverflow.com/questions/2754546/can-i-disable-a-css-hover-effect-via-javascript). Maybe it will help you. – BogdanG Dec 14 '20 at 19:03

1 Answers1

0
<!DOCTYPE html>
<html>
  <head>
    <title>Currency Converter</title>

</head>


<table>
  <tr><td>Blabla</td><td>Blabla</td>
  <td>
  ----
  <table>
   <tr>
    <td style="background-color:red !important;">
     qwertz
    </td>
   </tr>
  </table>
  ----
  </td></tr></table>

  </body>
</html>

Maybe you see the css path and can get the css code there, write a new one and load it after the "wrong".