Dashboards & Visualizations

Setting the text color in an apps navigation bar?

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

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

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

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.

Communicator

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

0 Karma

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

Champion

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

0 Karma

Communicator

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

0 Karma