I am stuck with this problem so any help would be appreciated. I have a table with several rows. Each cell within the row belongs to a certain class. I use these class names to
You probably need to use the !important designator to make sure that your hover style overrides the background defined int he class:
tr:hover {
background-color: #FFFFAF0 !important;
color: #000 !important;
}
Interestingly, this won't work for IE6 because that browser only applies hover to a tags.
The CSS instructions within the classname takes precedence over the <tr>
instructions.
To fix this, use td.summarypage-odd-column:hover, td.summarypage-even-column:hover inside your CSS.
Note: If you're using IE6, the :hover only works on links, i.e. a:hover.
never put space between
tr:hover(space)td
I was giving space hence it was working for me.
Try this:
tr:hover td {
background-color: #FFFAF0; color: #000;
}
Place this after the existing td
style declarations to be safe
I think the td
background-color overwrites the tr background-color. The solution given by @Nick Craver is the good one.
You must change cells background-color not the row background-color.
tr:hover td {
...
}
This does not happen for me. Make sure that you're only adding/removing class names when checking if they have an impact, and make sure that the td
s don't have their own background covering up that of the tr
.