This is a migrated thread and some comments may be shown as answers.

proper css to set column-header background color

2 Answers 396 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 21 Mar 2013, 11:34 AM
I have assigned a class to the column-header of a particular column.  I use the following CSS to set the style:

              th.foo {background-color: #339933  !important;
                           color: white !important}

This works correctly in IE9 and Safari, but only the font-color changes in Chrome; the background color does not change.  So I believe the selector is correct.  Does anyone know what is causing the Chrome issue?


    

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 21 Mar 2013, 05:58 PM
Hello Tim,

The issue is caused because there is a background-image property (check the attached image) which overrides the background-color (the background-color is drawn behind any background-images). In order to achieve  the desired outcome I recommend you using the background property instead? I.e.:
th.foo{
   background: red !important;
   color: white !important
}


Regards,

Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tim R
Top achievements
Rank 1
answered on 21 Mar 2013, 06:47 PM
Perfect. Thank you.
Tags
Grid
Asked by
Tim R
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Tim R
Top achievements
Rank 1
Share this question
or