1. 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?

Discussion in 'Styling and Customization Questions' started by JABRONI, Mar 9, 2013.

  1. JABRONI

    JABRONI Well-Known Member

    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,

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Can you post or PM a link to your forum so I can check?
     
  3. JABRONI

    JABRONI Well-Known Member

    I got it working. I had to put the CSS in thread_prefixes.css for it to work.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You shouldn't have to do that.

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

    Jake Bunce XenForo Moderator Staff Member

  6. ibnesayeed

    ibnesayeed Well-Known Member

    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. :)
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    ibnesayeed likes this.
  8. Steve F

    Steve F Well-Known Member

    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.
     
  9. Bram

    Bram Well-Known Member

    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?
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Exactly what did you change? Can you post a URL showing the problem?
     
  11. Bram

    Bram Well-Known Member

    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
     
  12. Steve F

    Steve F Well-Known Member

    The @property "titlePrefix"; is a property, you should just change the property
     
    tyteen4a03 likes this.
  13. Bram

    Bram Well-Known Member

    Not sure what you mean by that.
     
  14. Steve F

    Steve F Well-Known Member

    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
     
  15. BamBam

    BamBam Active Member

    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. :(
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

Share This Page