View Full Version : Grid Row Styling On Select

23 Feb 2010, 7:42 PM
I just spent a couple of hours researching and playing around with styling grid rows and I need a little assistance.

So I have a grid for members. If a member is 'inactive' I want that row to be red. I also need it to slightly change the color on hover and on selection; it is this part that I need assistance with.

.inactive-member-row{background: #FF0000;}
#members-grid .x-grid3-row-over{background-color: #00FF00;}
#members-grid .x-grid3-row-selected{background-color: #0000FF;}
Somehow the 2nd line actually functions correctly and only affects inactive members. I would have thought that it would affect every row in members-grid. Can someone explain to me why this is?

The 3rd line does not work at all. If I add !important to it, it affects every row. How can I make this only affect rows with the class 'inactive-member-row'?

Any help would be greatly appreciated.

I just found something strange out. By changing the first line from 'background' to 'background-color', the 2nd line no longer works. Changing the 2nd line from 'background-color' to 'background' results in it affecting every row (like I originally thought it would). Can anyone explain to me why this is happening? ext-all.css uses 'background-color'.