Splunk Search

How to change alignment of String to right side

SanthoshSreshta
Contributor

Hi splunkers,

After generating the table the columns having string datatype will automatically aligned to left side and measures to right side.
Can anyone help me in changing the default behavior of these.
Any tags needed for that?

Thanks,
santhosh.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You might get away with re-defining some of the standard CSS classes. You could change 'numeric' and 'numeric highlighted' to be left-justified, but that probably will be hard to read for most people. Use your browser's style editor to find the class(es) to change to make strings be right-justified.

---
If this reply helps you, Karma would be appreciated.
0 Karma

jeffland
SplunkTrust
SplunkTrust

If this is on a dashboard, simply use a .css with something like the following:

.results-table .wrapped-results th:nth-child(5), .results-table .wrapped-results td:nth-child(5) {
    text-align: right;
}

(Copied from here)

If you only want to apply this to one specific table, you can give that table an id and reference that id in the selection.

0 Karma

shugup2923
Path Finder

How can I set one column to left alignment and other column to right aligment , by using css my both columns are in right alignment now-
#table1 table.table tbody td {
width: 50% !important;
text-align: right !important;

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...