Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
palahyd
Partner - Contributor
Partner - Contributor

Add Background Color to Few Columns of A Straight Table

Hi Folks,

I am new to QlikSense development and would need your help and guidance in getting a formatting requirement achieved on a straight table in the Dashboard. I have a few columns, the headers for which needs to be colored differently (see attachment). 

I am using the below CSS code to get the headers colors, but when I scroll to the right (since the columns are pretty wider), the colors are getting moved dynamically based on the number of columns moved. Is there a way to keep it static ?

.qv-object-content-container .qv-object-content table th:nth-of-type(2) {
background-color: #e5d094;}
.qv-object-content-container .qv-object-content table th:nth-of-type(3) {
background-color: #e5d094;}
.qv-object-content-container .qv-object-content table th:nth-of-type(4) {
background-color: #e5d094;}
.qv-object-content-container .qv-object-content table th:nth-of-type(5) {
background-color: #e5d094;}
.qv-object-content-container .qv-object-content table th:nth-of-type(6) {
background-color: #e5d094;}
.qv-object-content-container .qv-object-content table th:nth-of-type(7) {
background-color: #ddff99;}
.qv-object-content-container .qv-object-content table th:nth-of-type(8) {
background-color: #ddff99;}
.qv-object-content-container .qv-object-content table th:nth-of-type(9) {
background-color: #ddff99;}
.qv-object-content-container .qv-object-content table th:nth-of-type(10) {
background-color: #ddff99;}
.qv-object-content-container .qv-object-content table th:nth-of-type(11) {
background-color: #ddff99;}

palahyd_0-1671486208411.png

 

Labels (1)
0 Replies