Dashboards & Visualizations

Setting the text color in an apps navigation bar?

szabados
Communicator

I have an app, and I want to use custom colors in the navigation bar.
The background color was easy, by setting it in the /nav/default.xml.
But I want to change the text color too, so I looked up it with firebug, which CSS class belongs it to.
My problem is, I can't find the CSS file in which I should change the color. I searched for the name of that CSS class, but all matching CSS files are located in the share/search_mrsparkle/ folder.

How can I change this text color for just that one app?

0 Karma
1 Solution

LukeMurphey
Champion

You should place the CSS selector in the dashboard.css (e.g. etc/apps/your_app/appserver/static/dashboard.css) or application.css (e.g. etc/apps/your_app/appserver/static/application.css) file of the app where you want the customization.

You will also need to make your CSS selector more specific than the default one in order for it to override it. Below is an example:

.app-bar.shared-appbar .nav-pills>li>a{
    color: red; /* Sets to red */
}

View solution in original post

LukeMurphey
Champion

You should place the CSS selector in the dashboard.css (e.g. etc/apps/your_app/appserver/static/dashboard.css) or application.css (e.g. etc/apps/your_app/appserver/static/application.css) file of the app where you want the customization.

You will also need to make your CSS selector more specific than the default one in order for it to override it. Below is an example:

.app-bar.shared-appbar .nav-pills>li>a{
    color: red; /* Sets to red */
}

LukeMurphey
Champion

Did you create both the application.css and dashboard.css? You'll need both depending on whether the view is simple XML or advanced XML.

szabados
Communicator

Thanks, I needed the dashboard.css, not the application.
Now works fine.

0 Karma

szabados
Communicator

Thanks, I created the file, but It doesn't get applied. Im inspecting it with firebug, and I don't even see that css file in the css list.

0 Karma

LukeMurphey
Champion

You will need to restart your Splunk instance in order for it to recognize the file.

0 Karma

szabados
Communicator

Sorry, I forgot to write in my previous answer, I restarted Splunk, but didnt help

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...