View Full Version : Changing Grid Backgroud Color

23 Jun 2010, 3:43 AM
Hi all,

Need your help for this one. I've been searching how to change the background color of my grid. I need to change the color of all rows, but specially only for a grid, not all of grids that i have.
I found in ext-all.css that the background color can be modified in this part:

.x-grid3-row td, .x-grid3-summary-row td {
vertical-align: top;
-moz-user-select: none;
background-color: ..... /* this will change the background color */

but it effected all of my grids.

Many thanks for your help


23 Jun 2010, 3:52 AM
Give your grid a cls (e.g. cls:'my-grid') and use:

.my-grid .x-grid3-row td, .my-grid .x-grid3-summary-row td {
background-color: green;

23 Jun 2010, 3:58 AM
Works like charm.. Thx a lot Condor :)
Btw, does this mean that the original css is overridden (only have "background-color") or the original css become having an additional "background-color" ?

Thx again.

23 Jun 2010, 4:54 AM
Every style property can only have one value, so the best matching css rule will override any specified style properties of css rules with lower rank.