Dashboards & Visualizations

Change the font type to Bold for one particular table

nagar57
Communicator

I have multiple tables in my dashboard. I want to change the font for one particular table.

I tried the below CSS but it is changing the font of all the tables in the Dashboard.

#all_req_table .table th, .table td {
            text-align: left !important;
            font-weight: bold !important;
          }

I want the font type to bold only for table with id="all_req_table"

Labels (1)
0 Karma
1 Solution

vnravikumar
Champion

Hi

Check this

<dashboard>
  <label>tablr</label>
  <row depends="$hide$">
    <html>
        <style>
          #table1 .table th,#table1  .table td {
             text-align: left !important;
             font-weight: bold !important;
           }

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

      <table id="table1">
        <search>
          <query>index="_internal" |stats count by sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>

      <table id="table2">
        <search>
          <query>index="_internal" |stats count by source</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

0 Karma

niketn
Legend

@nagar57 please try the following ... you missed adding table id #all_req_table to .table td

#all_req_table .table th, 
#all_req_table .table td {
    text-align: left !important;
    font-weight: bold !important;
}
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

vnravikumar
Champion

Hi

Check this

<dashboard>
  <label>tablr</label>
  <row depends="$hide$">
    <html>
        <style>
          #table1 .table th,#table1  .table td {
             text-align: left !important;
             font-weight: bold !important;
           }

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

      <table id="table1">
        <search>
          <query>index="_internal" |stats count by sourcetype</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>

      <table id="table2">
        <search>
          <query>index="_internal" |stats count by source</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...