Splunk Enterprise

help on panel background color

jip31
Motivator

hi

why my background color property dont works while the font size property works?

thanks

 

 <row>
    <panel>
      <html>
        <style>
          <b>
        <font size="4" face="verdana" color="blue" background-color="white">
            <center>   
            </center>
        </font>
        </b> </style>
       </html>
    </panel>
  </row>

 

Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

XML is hierarchical so you have to close the current tag before closing the next tag outwards and so on

  <row>
     <panel>
       <html>
         <style>
         </style>
       </html>
     </panel>
  </row>

Id's have to be unique, but the selector in the style can be partial e.g. ids beginning with white or yellow (these could be anything and don't have to be related to the style being applied).

        <style>
          div[id^="white_panel_"]
          {
            background:white !important;
          }
          div[id^="yellow_panel_"]
          {
            background:yellow !important;
          }
        </style>

 

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The style does not look like it is using the correct syntax.

        <style>
          div[id="panel_id"]
          {
            background:white !important;
          }
        </style>
0 Karma

jip31
Motivator

OK thanks

Other questions

1) Could you confirm me that I have to put <style> tags like this?

  <row>
     <panel>
       <html>
         <style>
  </row>
     </panel>
       </html>
         </style>

2) What I have to do if i want to call the code below many times in my dashboard because if I reuse id=panel1 Splunk tell me "duplicate id"

[id="panel1"] .dashboard-panel {
background:white !important;

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

XML is hierarchical so you have to close the current tag before closing the next tag outwards and so on

  <row>
     <panel>
       <html>
         <style>
         </style>
       </html>
     </panel>
  </row>

Id's have to be unique, but the selector in the style can be partial e.g. ids beginning with white or yellow (these could be anything and don't have to be related to the style being applied).

        <style>
          div[id^="white_panel_"]
          {
            background:white !important;
          }
          div[id^="yellow_panel_"]
          {
            background:yellow !important;
          }
        </style>

 

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...