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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...