Dashboards & Visualizations

How to include CSS in Dashboards with the latest Splunk version

shakura
Engager

Before our company's latest Splunk upgrade I was able to incorporate CSS code in my dashboards in the following way:

<form>

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

             [ CSS code goes here ]

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

<form>

However, after the upgrade, this piece of code doesn't seem to have any effect and I am unable to customize styling.

Our current Splunk version:
Splunk Enterprise
Version: 7.3.3

1 Solution

niketn
Legend

@shakura this is a known issue with 7.3.3 where CSS override from within the dashboard is not working. https://docs.splunk.com/Documentation/Splunk/7.3.3/ReleaseNotes/Knownissues#Uncategorized_issues

  1. You can either include the CSS as static stylesheet to your dashboard. https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/UseCSS#Customize_styling_and_behavio...

  2. Or add a <p/> element before the <style> element in the dashboard. Refer to the workaround in the Splunk Answers post: https://answers.splunk.com/answers/789487/why-doesnt-css-work-in-dashboards.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@shakura this is a known issue with 7.3.3 where CSS override from within the dashboard is not working. https://docs.splunk.com/Documentation/Splunk/7.3.3/ReleaseNotes/Knownissues#Uncategorized_issues

  1. You can either include the CSS as static stylesheet to your dashboard. https://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/UseCSS#Customize_styling_and_behavio...

  2. Or add a <p/> element before the <style> element in the dashboard. Refer to the workaround in the Splunk Answers post: https://answers.splunk.com/answers/789487/why-doesnt-css-work-in-dashboards.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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