Splunk Search

Changing font and color in the body of a simple table

dspracklen
Path Finder

It doesn't matter if the answer is in CSS or Advanced XML or both. I'm not even certain Advanced XML has access to properties for this though.

The default blue color (and font) is not working well in this instance. I wanted to change the defaults for both in the simple results table, but apparently I can't find the correct CSS combination to do that. The example default CSS file doesn't do this; it only sets the header text color.

Thus far I have tried many combinations of CSS changes including "table.splTable td a {color: #000000;}" and "table.splTable td {color: #000000;}" and gotten nothing to change. I was able to change the header colors, but those are already fine.

Searching for Advanced XML help with module properties leads me exclusively to changing fonts on charts and not tables.

Thanks for any help you can give.

1 Solution

dspracklen
Path Finder

Someone here used Chrome's 'inspect element' to figure out the CSS magic required to fix the colors. The CSS element to do this is:

.SimpleResultsTable table.enableMouseover tr td.d {
color:#000000;
}

Esoteric? Yes. Works? Yes.

View solution in original post

dspracklen
Path Finder

Someone here used Chrome's 'inspect element' to figure out the CSS magic required to fix the colors. The CSS element to do this is:

.SimpleResultsTable table.enableMouseover tr td.d {
color:#000000;
}

Esoteric? Yes. Works? Yes.

ChrisG
Splunk Employee
Splunk Employee

I did a little more research on this. There is a simpleResultsTable.css file that has the setting you found in $SPLUNK_BASE/share/splunk/search_mrsparkle/modules/results. We will update the App Framework Cookbook topic to say more about where the default CSS files are located.

ChrisG
Splunk Employee
Splunk Employee

There's an App Framework Cookbook topic on the dev portal on How to do simple app customizations. If you read down through that topic, you will find a section about how to define your own CSS. It includes an example that (1) changes the default cell background color in the simpleResultsTable module, and (2) highlights a row when you hover your cursor over it. Hope that helps point you in the right direction!

dspracklen
Path Finder

The page does have some good information on it, but sadly none of it really helps to resolve the inability to change text color inside a table. Using their examples I can change the background colors and highlight color. I can even put text decorations on it. I changed the font family and weight, but the text itself steadfastly remains the same blue. I've even made sure this happens for both Firefox and Chrome.

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...