<?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 center the title of a panel and color the title background? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259989#M16354</link>
    <description>&lt;P&gt;You should be able to use the HTML visualization on simple xml to create you own Panel title and customize it. &lt;/P&gt;

&lt;P&gt;See an example here&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/150086/how-to-center-title-of-a-panel-in-xml.html"&gt;https://answers.splunk.com/answers/150086/how-to-center-title-of-a-panel-in-xml.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk doc for the same&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#html"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2016 16:46:10 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-03-23T16:46:10Z</dc:date>
    <item>
      <title>How to center the title of a panel and color the title background?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259988#M16353</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've seen panels like this in a video.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1171i47A0007DD43DB615/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;How can I center the panel title and color the background of the title?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 13:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259988#M16353</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2016-03-23T13:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to center the title of a panel and color the title background?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259989#M16354</link>
      <description>&lt;P&gt;You should be able to use the HTML visualization on simple xml to create you own Panel title and customize it. &lt;/P&gt;

&lt;P&gt;See an example here&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/150086/how-to-center-title-of-a-panel-in-xml.html"&gt;https://answers.splunk.com/answers/150086/how-to-center-title-of-a-panel-in-xml.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk doc for the same&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#html"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 16:46:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259989#M16354</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-23T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to center the title of a panel and color the title background?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259990#M16355</link>
      <description>&lt;P&gt;I think it's much easier to apply simple CSS to your dashboard. On your splunk server, navigate to %SPLUNK_HOME/apps/your_app/appserver/static (create folder if necessary) and place a file there, e.g. &lt;CODE&gt;my_stylesheet.css&lt;/CODE&gt;, giving it this content:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.dashboard-header &amp;gt; h2:nth-child(2) { text-align: center; }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Restart splunk, and edit the xml of your dashboard from&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;fieldset ...&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;row&amp;gt;...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form stylesheet="my_stylesheet.css"&amp;gt;
  &amp;lt;fieldset ...&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard stylesheet="my_stylesheet.css"&amp;gt;
  &amp;lt;row&amp;gt;...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reload the page without browser cache (CTRL-SHIFT-R in Firefox or CTRL-F5 in Chrome, other combos might work as well) and you're good to go.&lt;/P&gt;

&lt;P&gt;If you want to change different texts on the page (this example changes the dashboard title), simply right-click them and select "Inspect Element" in Firefox or "Inspect" in Chrome, and in the Inspector select "Copy unique selector" in FF or "Copy &amp;gt; Copy Selector" in Chrome. Then, paste your clipboad content instead of &lt;CODE&gt;.dashboard-header &amp;gt; h2:nth-child(2)&lt;/CODE&gt; and that's it.&lt;/P&gt;

&lt;P&gt;Oh and about the background color: change&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.dashboard-header &amp;gt; h2:nth-child(2) { text-align: center; }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.dashboard-header &amp;gt; h2:nth-child(2) {
    text-align: center;
    background-color: aliceblue;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and adjust the color to your liking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-center-the-title-of-a-panel-and-color-the-title/m-p/259990#M16355</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2020-09-29T09:10:43Z</dc:date>
    </item>
  </channel>
</rss>

