I created a table that dynamically highlights all odd rows.
To achieve this, I implemented a method to identify the row number and then apply the alt
class to those specific rows.
In order to highlight the rows on hover, I added a simple :hover
selector in the CSS stylesheet.
Oddly enough, the CSS code works perfectly for highlighting the non-.alt
rows but not the ones with the alt
class.
Here is the snippet of my CSS code:
.datagrid tr:hover, .datagrid tr.alt:hover {
background-color:#497A43;
color:#D3F0D4;
}
Can anyone help me figure out what may be going wrong?