Dashboards & Visualizations

unable to customize css

sou128
Explorer

I'm following the instruction here to inject my own css in my adv. xml.

http://docs.splunk.com/Documentation/Splunk/latest/Developer/UseCSS#Configure_CSS_for_a_view

so my css lives in search/appserver/static.

But the view is still using the styles in application.css. am i missing something?

here's a snippet of my xml

< view autoCancelInterval="90" isVisible="true" objectMode="SimpleDashboard" onunloadCancelJobs="true" refresh="-1" template="dashboard.html" stylesheet="portal-splunk.css" >

thanks

Tags (2)

guilhem
Contributor

I have done it and it works well, The problem is that you have to set the properties as !important in the "myCustom.css" file.

Some pitfalls:

1°) Be sure to create the "myCustom.css" file and then restart splunk web so it can pick it up
2°) sometimes css properties aren't overrided by the custom css (don't know why), just add the !important tag at the end of the property.
3°) Sometimes even after a refresh the page isn't updated, don't hesitate to bump.

Drainy
Champion

CSS is applied in the order it is read in, some of the HTML in Splunk isn't very well formed and has styling applied in the tags or on the page itself so these require the !important tag as this forces the browser to ignore the order of loading. To avoid bumping just use CTRL+F5 to reload the browser cache

Drainy
Champion

What you want to do is edit application.css directly. Don't worry about including the stylesheet tag like that.
Anything you do in application.css in the appserver/static directory will override any default CSS settings across the APP.

0 Karma

sou128
Explorer

I just want to modify my view, how can I do that?
Modifying application.css will affect other teams' views as well, right?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...