<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to make  a css script affect only specific panels? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645827#M52729</link>
    <description>&lt;P class="lia-align-left"&gt;You can use id that can be referenced by the css.&lt;/P&gt;&lt;P class="lia-align-left"&gt;Check this example dashboard (you can just copy/paste in to a new dashboard &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;css test&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
      &amp;lt;style&amp;gt;
      #mycss table tr{
        font-size:150% !important;
        font-weight: bold;
        width:150px !important;
        border: 1px solid black !important;
        text-align: right !important;
        background-color: #FF00FF !important;
        
      }
      &amp;lt;/style&amp;gt;&amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="mycss"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype IN (splunkd, splunk_python)| timechart span=1h count by sourcetype | table _time splunkd * | fillnull value=0 splunkd splunk_python mongod&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-4h@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype IN (splunkd, splunk_python)| timechart span=1h count by sourcetype | table _time splunkd * | fillnull value=0 splunkd splunk_python mongod&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-4h@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P class="lia-align-left"&gt;Note that I added the mycss id to the css and to one of the tables.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2023 23:39:02 GMT</pubDate>
    <dc:creator>diogofgm</dc:creator>
    <dc:date>2023-06-05T23:39:02Z</dc:date>
    <item>
      <title>How to make  a css script affect only specific panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645802#M52724</link>
      <description>&lt;P&gt;Hello I have the below css which affects all the panels including date/time filter..HOw can I make it affect only the panels I want.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;row&amp;gt;
    &amp;lt;panel depends="$alwaysHideCSSPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
         &amp;lt;style&amp;gt;
           table thead tr th,td{
           font-size:150% !important;
           width:150px !important;
           border: 1px solid black !important;
           text-align: right !important
           }
           table thead tr th{
            font-weight: bold !important;
           }
           
           g[transform] text {
            font-size:130% !important;
            }
            
           g.highcharts-axis-labels text {
            font-size:130% !important;
            }

           g.highcharts-axis text {
            font-size:130% !important;
            }
            
           h2 text {
            font-size:130% !important;
            }
          &amp;lt;/style&amp;gt;
       &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 19:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645802#M52724</guid>
      <dc:creator>power12</dc:creator>
      <dc:date>2023-06-05T19:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to make  a css script affect only specific panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645827#M52729</link>
      <description>&lt;P class="lia-align-left"&gt;You can use id that can be referenced by the css.&lt;/P&gt;&lt;P class="lia-align-left"&gt;Check this example dashboard (you can just copy/paste in to a new dashboard &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard version="1.1"&amp;gt;
  &amp;lt;label&amp;gt;css test&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html&amp;gt;
      &amp;lt;style&amp;gt;
      #mycss table tr{
        font-size:150% !important;
        font-weight: bold;
        width:150px !important;
        border: 1px solid black !important;
        text-align: right !important;
        background-color: #FF00FF !important;
        
      }
      &amp;lt;/style&amp;gt;&amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="mycss"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype IN (splunkd, splunk_python)| timechart span=1h count by sourcetype | table _time splunkd * | fillnull value=0 splunkd splunk_python mongod&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-4h@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype IN (splunkd, splunk_python)| timechart span=1h count by sourcetype | table _time splunkd * | fillnull value=0 splunkd splunk_python mongod&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-4h@m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P class="lia-align-left"&gt;Note that I added the mycss id to the css and to one of the tables.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 23:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645827#M52729</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2023-06-05T23:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to make  a css script affect only specific panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645828#M52730</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239523"&gt;@power12&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you give your panels IDs, then you can specify them in the CSS.&lt;/P&gt;&lt;P&gt;If you give panels an identifier "XXX_" and a number, then you can use a neat CSS trick where you apply the CSS to all DIVs whose ID starts with "XXX_"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row&amp;gt;
   &amp;lt;panel id="apply_css_1"&amp;gt;...&amp;lt;/panel&amp;gt;
   &amp;lt;panel id="apply_css_2"&amp;gt;...&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&amp;lt;row&amp;gt;
   &amp;lt;panel id="apply_css_3"&amp;gt;...&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then create your CSS panel and add the prefix: &lt;STRONG&gt;div[id^=apply_css]&lt;/STRONG&gt; to each class&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;row&amp;gt;
    &amp;lt;panel depends="$alwaysHideCSSPanel$"&amp;gt;
      &amp;lt;html&amp;gt;
         &amp;lt;style&amp;gt;
           div[id^=apply_css] table thead tr th,td{
           font-size:150% !important;
           width:150px !important;
           border: 1px solid black !important;
           text-align: right !important
           }
           div[id^=apply_css] table thead tr th{
            font-weight: bold !important;
           }
        &amp;lt;/style&amp;gt;
     &amp;lt;/html&amp;gt;
   &amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;That way your CSS is only applied to the panels you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 00:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645828#M52730</guid>
      <dc:creator>danspav</dc:creator>
      <dc:date>2023-06-06T00:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to make  a css script affect only specific panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645981#M52743</link>
      <description>&lt;P&gt;Thank You this worked&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 17:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-a-css-script-affect-only-specific-panels/m-p/645981#M52743</guid>
      <dc:creator>power12</dc:creator>
      <dc:date>2023-06-06T17:16:18Z</dc:date>
    </item>
  </channel>
</rss>

