Dashboards & Visualizations

Background color table using CSS

rony121
Loves-to-Learn Lots

HI, 

I want to add background color to a table in a panel using css but without using "!important" as I dont want to overwrite existing configuration of panel in dashboard. 
Acutal requirement: https://community.splunk.com/t5/Dashboards-Visualizations/Css-Overwrites-existing-feature-within-das...

<row>
<panel depends="$alwaysHideCSS$">
<html>
<style>

#table1 .table th, .table td{ background-color: #808080 !important; }
#table1 .table th, .table tr{ background-color: #FFA500 !important; }

#Panel1 .dashboard-panel,#Panel .dashboard-panel {
background: #808080 !important;
}

</style>
</html>
</panel>
</row>

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You are not showing it here but presumably you are formatting cells in the dashboard?

Try formatting them all with the background before other formatting

        <format type="color">
          <colorPalette type="expression">#808080</colorPalette>
        </format>
        <format type="color" ...

You can then remove  the td styling

0 Karma
Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...