Looking for CSS to display thread prefixes as images (.icon-* labels)

UltraPyromane

Active member
Registered
Joined
Mar 27, 2023
Messages
39
Points
18

Reputation:

Hi everyone,

I’m trying to display thread prefixes as images in XenForo 2.x.
For example, instead of showing text like “rwe” or “sgd”, I want to show a small icon – both in the thread title and in the prefix selection menu.

I remember seeing a working solution somewhere that used CSS classes like .icon-rwe for this, but I can’t find it anymore.

I’ve already tried many approaches:

  • .prefixLabel, .icon-rwe, .label.label--rwe
  • text-indent: -9999px
  • ::before pseudo-elements
  • Extra.less + inline CSS
Nothing works reliably. Does anyone know a working method to display thread prefixes as images, ideally with CSS or minimal JS, that works both in the thread title and in the prefix menu?

Thanks in advance!
 

Splicho

Synapse-Themes.cc Owner
Staff member
Moderator
Collaborate
Registered
Joined
Jan 21, 2022
Messages
842
Points
153

Reputation:

I am not entirely sure if that is achieveable with only CSS/JS or whatever.
Pretty sure a custom addon is needed for that, since XenForo applies text +css by defult to prefixes no matter what.
 

UltraPyromane

Active member
Registered
Joined
Mar 27, 2023
Messages
39
Points
18

Reputation:

I simply want to convert the prefixes to an image instead of text.
I once had a description, but I can't find it. It's about XenForo 2.2.
 
Top