Dashboards & Visualizations

is there a way to add CSS code inside the Dashboard HTML code?

maximusdm
Communicator

Hi there
I know I can create my CSS file and copy it to a specific dir and point to the file as follows:

However I do not have access to the Splunk server directories/or even the physical server.
I need to add the code below to reduce the font size of my single value:

  .single-value .single-result {
      font-size: 18px !important;
  }

Is there a way to do that?

Tags (3)
0 Karma
1 Solution

lquinn
Contributor

If you just want to do this in a HTML dashboard you can simply include the above css within style tags after your header. You can edit the source code straight from the Splunk UI. So something like this ...

<style>
    .single-value .single-result {
        font-size: 18px !important;
    }
</style>

View solution in original post

0 Karma

lquinn
Contributor

If you just want to do this in a HTML dashboard you can simply include the above css within style tags after your header. You can edit the source code straight from the Splunk UI. So something like this ...

<style>
    .single-value .single-result {
        font-size: 18px !important;
    }
</style>
0 Karma

maximusdm
Communicator

I had tried that but it gives me an error when parsing the XML. Where exactly do I add it?
before or inside the tag? I tried both. Thanks

0 Karma

lquinn
Contributor

This works for HTML dashboards not XML. Not quite so simple I don't think if you want to keep it as XML ...

0 Karma

lquinn
Contributor

Is it a HTML dashboard or XML?

0 Karma

maximusdm
Communicator

I found this help but I dont have access to the splunk directories.:
https://docs.splunk.com/Documentation/Splunk/6.5.1/AdvancedDev/UseCSS

In Asp.Net I always use for small modifications instead of pointing to a CSS file.

0 Karma

maximusdm
Communicator

It says View Type XML

0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...