• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom CSS Prefixes Are Not Working?

JABRONI

Well-known member
#1
For some reason, it isn't pulling my custom CSS for prefixes from my EXTRA.css correctly. The span class is there when I inspect it, but it isn't pulling the CSS from the class. Anyone know why it wouldn't be?

Here is an album,







 

Brogan

XenForo moderator
Staff member
#4
You shouldn't have to do that.

Check your EXTRA.css and make sure there are no missing closing curly brackets.
 

ibnesayeed

Well-known member
#6
Your custom CSS class has a space? It should be one class name. No space.

For reference:
http://xenforo.com/community/threads/editing-prefixes.44222/#post-475266
Is this a requirement or limitation of XenForo? Standard HTML element class attribute can have multiple space separated class names. I would actually prefer multiple class name approach as it will allow DRY (Dont Repeat Yourself) CSS. For example, if we have a set off prefixes that can be categorized in multiple ways. One categorization can be expressed using border color, other categorization using background color and third categorization using text color. In this case, rather than having CSS rules of all possible scenarios, we can just write CSS for individual atomic classes then mix and match the class names in custom thread prefix field. :)
 

Steve F

Well-known member
#8
I have had a difficult time before getting the CSS to update for prefixes. Kept trying Ctrl+F5, it would show up then disappear numerous times. Not sure but we do use a cache front-end and APC back-end if that might have anything to do with it.
 

Bram

Well-known member
#9
I changed one border-radius line in the thread_prefixes.css template and now my prefixes are not longer clickable.

Not sure if this is style related but it has happened to me before that when i make a change in a .css template something in the stylevars gets overwritten.

Where can i find the part that makes prefixes clickable?
 

Bram

Well-known member
#11
Basically removed the border-radius from this code

Code:
.prefix
{
    @property "titlePrefix";
    background: transparent url('@imagePath/xenforo/gradients/form-button-white-25px.png') repeat-x top;
    padding: 0px 6px;
    margin: -1px 0;
    border: 1px solid transparent;
    border-radius: 4px;
    display: inline-block;
    @property "/titlePrefix";
}
After saving I can no longer filter on prefix categories on the entire board. Still works in the default xenforo style: http://www.racedepartment.com/forum/forums/f1-2012-mods.140/

Thanks for the swift reply Jake
 

Steve F

Well-known member
#14
You are editing part of the template that has a style property assigned to it, use the style property to make changes. If you directly edit the template it will show outdated after an update.

Style Properties -> General -> Title Prefix
 

BamBam

Active member
#15
Hi,

Is it not possible to create a Custom Prefix Color just with CSS Colors? I mean Medium Blue or #0000CD - but this is not working. :(