Dashboards & Visualizations

Zebra striped tables

IgorB
Path Finder

Is there a simple way of "zebra striping" results rows in SimpleResultsTable, e.g. change background of all even-numbered lines to light gray?

Tags (1)
1 Solution

ziegfried
Influencer

It is possible to do this in CSS, but only if you're using a CSS3 capable browser. In the application.css file, add something like:

table.simpleResultsTable tr:nth-child(even) { background-color: #ddd; }
table.simpleResultsTable tr:nth-child(odd) { background-color: #fff; } 

View solution in original post

ziegfried
Influencer

It is possible to do this in CSS, but only if you're using a CSS3 capable browser. In the application.css file, add something like:

table.simpleResultsTable tr:nth-child(even) { background-color: #ddd; }
table.simpleResultsTable tr:nth-child(odd) { background-color: #fff; } 
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...