Solved Templates

badges badges-info

Asked by [email protected] 3 years ago Last activity 3 years ago

I need to change the color and font-size of the ''Total: _ results found." badge in Joomla Search, but nothing I have tried will work.

The default font color is white and this is very difficult to see.

Does this need to be changed somewhere other than Custom CSS?

I'm providing a link to the page in question. Hopefully that makes things clearer.

Accepted answer

Marked as the solution
[email protected] Asked this

It worked when I added it to the custom.css file. For whatever reason.

It should have worked in Template Options > Custom Code > Custom CSS.

Perhaps there is a technical issue with that.

I always test things there before commiting them to custom.css.

Anyways, it works now. Thank you for your time.

5 more replies

Paul Frankowski Senior Staff
3 years ago · edited

Hi,

easy, yes, this time you have to use Custom CSS (how? Read in template or helix documenation)

EXAMPLE CSS CODE:

.badge.badge-info { color: red !important; }

Extra tip:

use also that line

.highlight { background: yellow; }

Of course, you can change used colors ;)

[email protected] Asked this

Neither of these work, Paul.

What I had tried previously was:

.badge.badge-info {
--bs-badge-font-size: 1.25em !important;
--bs-badge-color: #991b1e !important;
}

This works using Chrome's "Inspect" feature, but does not work in Custom CSS.

THis is the last code I have placed in the Custom CSS, so there is no other code there that could be interfering.

Any other ideas?

Paul Frankowski Senior Staff

My code works, tested on my private site.

Just paste into Template Options > Custom Code > Custom CSS

[email protected] Asked this

I put in the code you gave me, and left it there, Paul. I even added !important to the color in case the browser needed the change to be forced. See the attached screen shot.

![https://wahnapitaefn.ca/images/errors/Screen%20Shot%20Paul.png]

You can try doing a search yourself on the website. https://wahnapitaefn.ca/component/search/?searchword=rocky%27s&searchphrase=all&Itemid=744

The code does not work. I had tried this already. THis is why I am asking for assitance.

Paul Frankowski Senior Staff
3 years ago · edited

I checked both :

  1. Sourcecode < style > section
  2. Custom.css file

I don't see my CSS code there :(

info_793_2023.jpg

Task 4 You: maybe indeed add to custom.css (!) file at the top in case of somehow Custom CSS from textarea is not used in search view?.

Log in to reply.