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

Not a Bug Staff Banner CSS

Discussion in 'Resolved Bug Reports' started by AWS, Sep 2, 2013.

  1. AWS

    AWS Well-Known Member

    I searched and didn't see this posted.

    I created some new staff banners and put the css in extra.css as Brogans guide showed. The new banner class would not load. I had to move the custom banner css into userbanner.css and once I did that the new banner css would load.
     
  2. Mike

    Mike XenForo Developer Staff Member

    I can't reproduce this, but I suspect it's a CSS specificity issue - you just need to use a selector to ensure that your CSS overrides the default version.

    Using this CSS is fine:
    Code:
    .userBanner.bannerStaff
    {
        background-color: red;
    }
    It has the same specificity but as long as it comes after the original definition, it's fine. It it comes before, you can bump up the specificity. (!important being an example of this, though a non-ideal one.)

    Otherwise, if that's not something you want to get into, editing the CSS directly is always an option (and perhaps the simplest version).
     

Share This Page