Splunk Search

table with custom width for column

DataOrg
Builder

I have around 15 columns in table , where i want to have fixed column width for 3columns with 30px and other remaining column with 15px to accommodate in single view 100%

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

ITWhisperer
SplunkTrust
SplunkTrust

Use a hidden panel with some style

 

    <panel depends="$alwaysHideCSSPanel$">
      <html>
        <style>
          #tableWithFixedColumnWidth th,
          #tableWithFixedColumnWidth td {
              width: 15px !important;
              overflow-wrap: anywhere !important;
          }
          #tableWithFixedColumnWidth th:nth-child(1),
          #tableWithFixedColumnWidth td:nth-child(1),
          #tableWithFixedColumnWidth th:nth-child(2),
          #tableWithFixedColumnWidth td:nth-child(2),
          #tableWithFixedColumnWidth th:nth-child(3),
          #tableWithFixedColumnWidth td:nth-child(3) {
              width: 30px !important;
              overflow-wrap: anywhere !important;
          }
        </style>
      </html>
    </panel>
    <panel>
      <table id="tableWithFixedColumnWidth">

 

You should set styles for header and data elements

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Use a hidden panel with some style

 

    <panel depends="$alwaysHideCSSPanel$">
      <html>
        <style>
          #tableWithFixedColumnWidth th,
          #tableWithFixedColumnWidth td {
              width: 15px !important;
              overflow-wrap: anywhere !important;
          }
          #tableWithFixedColumnWidth th:nth-child(1),
          #tableWithFixedColumnWidth td:nth-child(1),
          #tableWithFixedColumnWidth th:nth-child(2),
          #tableWithFixedColumnWidth td:nth-child(2),
          #tableWithFixedColumnWidth th:nth-child(3),
          #tableWithFixedColumnWidth td:nth-child(3) {
              width: 30px !important;
              overflow-wrap: anywhere !important;
          }
        </style>
      </html>
    </panel>
    <panel>
      <table id="tableWithFixedColumnWidth">

 

You should set styles for header and data elements

0 Karma

DataOrg
Builder

@ITWhisperer perfect worked well 🙂

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...