Dashboards & Visualizations

How do you adjust simple xml table column width in Splunk 6.x?

anwarmian
Communicator

I am trying to find out how to adjust the widths of columns in a table in Simple XML. I've explored some .css and .js options but could not find a satisfactory answer. Could someone shed some light on it. Thanks

sdhawanx
Path Finder

 you can use something like this if you want to make changes to a particular column

#tableWithDrilldown td:nth-child(16) {
          color: #1717E6 !important;
          font-weight: bold !important;
          text-decoration: underline !important;
          text-decoration-color: blue !important;
          }

 

0 Karma

fdi01
Motivator

in you table put id as

<table id="size_cell">
.......
.....
</table >

in you .css file add

#size_cell  td.size {
 size: 25px;
background-color: #ffc57a !important;
font-weight: bold;
}

you can change the size with size: size_valeur pixel as you want.
or you use the width and height attributes by specifying the values of your choice in your .css file

anwarmian
Communicator

Good answer fdi01. I've tried this but other css files (i,e.bootstrap.min.css, etc) are taking precedence over my custom css file event if I use "!important; ." I believe using % is good for column width. I was actually interested in setting column width on a particular column (i.e. 4th column) in a table. Thank you for your answer.

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...