Jump to content

Inheritance problem, maybe?


mgraham

Recommended Posts

I have a table in which I want to set the :hover value to give me a reverse video effect using this code:

 

table.checklist-table th:hover,table.checklist-table td:hover { color: white; background-color: rgba(0,0,256,1);}

The weird thing is that the background colour changes but the foreground text colour does not. Instead it keeps the general body text colour specified here:

 

body { color: #222; height: auto; height: 100%; line-height: 1.3em; min-height: 100%;}

I really don't understand why it's using the inherited color when the rule for the table is so very much more particular, and it *is* changing the background so I know the rule is triggering, it's just not using the "color: white".

 

Any thoughts?

 

Mike

Link to comment
Share on other sites

There probably are other selectors in the document interfering. Without seeing all the code I won't be able to know.

 

Check for any other rules setting the color of a <td> or <th> element, or a rule changing the color of a different element that's inside a table cell.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...