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!

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 ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...