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!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...