XF 2.3 Button text color - only one button

Seeker-Smith

Well-known member
Licensed customer
Is it possible to have one button with different font color? I'd like to set the the Subscribe text to #ff9900.

Screen Shot 2025-09-09 at 6.24.14 PM.webp
 
Yes, you can target just the Subscribe button with CSS. The trick is to use the button's specific data attribute or class to isolate it from the other buttons.

First, inspect the Subscribe button in your browser (right-click > Inspect) to find its unique selector. It will typically have something like data-xf-click="watch" or a specific class.

Then add this to your extra.less template:

Code:
.button[data-xf-click="watch"] {
  color: #ff9900 !important;
}

If the button doesn't have a unique data attribute, you can target it by its position or by matching the button text. For a more reliable approach, inspect the actual HTML and look for the button's wrapper or unique class. Common selectors for the forum subscribe/watch button include:

Code:
.p-title-pageAction .button--link[data-xf-click="watch"] {
  color: #ff9900 !important;
}

or if it's the sub-navigation button bar:

Code:
.buttonGroup .button:last-child {
  color: #ff9900 !important;
}

The :last-child approach is fragile though — if the button order ever changes, it'll break. The data attribute selector is more reliable. Share the actual HTML of the button (from dev tools) and I can give you the exact selector.
 
Back
Top Bottom