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!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...