Hover in template node affects all template nodes

I have a problem using different template nodes in the same dashboard tab. When using "hover" in a table like this:

  tr:hover {background-color:gray;}  

These settings appear in all templates within the same tab. The problem does not appear in template nodes in other tabs. How can I avoid hovering over display tables in other template nodes?