Dashboards & Visualizations

How To Use Two Different CSS Files For A Dashboard?

vtsguerrero
Contributor

How can I include different css files for one dashboard?

Tags (2)
0 Karma
1 Solution

gyslainlatsa
Motivator

hi vtsguerrero,
try to put this in the header of the code of your dashboard

<dashboard  stylesheet="file1.css, file2.css">
    --------
</dashboard>

try and let me know if it working

View solution in original post

LukeMurphey
Champion

You can do this with a CSS import declaration.

For the sake of this example, assume that the view imports the CSS file "mystyle.css":

<form stylesheet="mystyle.css">
 ...

The mystyle.css file then includes CSS import declarations which import other files:

@import url("style1.css");
@import url("style2.css");

Note that the import declarations need to be at the top of your CSS files (before other styling statements).

gyslainlatsa
Motivator

hi vtsguerrero,
try to put this in the header of the code of your dashboard

<dashboard  stylesheet="file1.css, file2.css">
    --------
</dashboard>

try and let me know if it working

vtsguerrero
Contributor

Worked well, thanks a lot @gyslainlatsa !

0 Karma
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...