XF 2.0 Xenforo 2- Different Category Strip Images

Trueprime

Well-known member
I been looking for some way to implement different images per category strip titles. I have seen some topics on this for XF1 version as seen here but I'm looking to accomplish this in Xenforo 2. Any help or suggestions on this will be appreciated, thanks :)
 
Last edited:
like this?
catsimg.webp

If so. Add to extra.less replacing the X with your ID.
Code:
.block.block--category.block--categoryX .block-container .block-header {
background-image: url('/images/thisimage.jpg');
background-repeat: no-repeat;
background-position: center;    
}
 
@Jordyn that did the trick! I did have help from @logixsol for the rest of the coding and made it work using this code
Code:
.block--category15  h2{
background-image: url('mysite.com/image/catbg1.png');
background-repeat: no-repeat;
background-position: center;
}
Thank you again for the help :)
 
Last edited:
@Jordyn that did the trick! I did have help from @logixsol for the rest of the coding and made it work using this code
Code:
.block--category15  h2{
background-image: url('mysite.com/image/catbg1.png');
background-repeat: no-repeat;
background-position: center;
}
Thank you again for the help :)
No worries mate, good work . Cheers ;)

You can certainly have some fun with this.
xffun.webp
This is my updated code just encase others are interested for default style.
Code:
/* Categories Images and Title */
.block--categoryX .block-header {
background-image: url('/images/cover-line-pay.jpg');
background-repeat: no-repeat;
background-position: center;
height: 60px;
text-transform:;
font-weight: bold;
font-size: 20px;
font-family: cursive;
color: #FFF;
text-shadow: black 0.1em 0.1em 0.2em;
}
/**********/
/* Categories Descriptions */
.block--categoryX .block-desc {
color: #000;
text-transform:;
font-family: monospace;
text-shadow:
   -1px -1px 0 #FFF, 
    1px -1px 0 #FFF,
    -1px 1px 0 #FFF,
     1px 1px 0 #FFF;
}
/**********/
 
No worries mate, good work . Cheers ;)

You can certainly have some fun with this.
View attachment 185431
This is my updated code just encase others are interested for default style.
Code:
/* Categories Images and Title */
.block--categoryX .block-header {
background-image: url('/images/cover-line-pay.jpg');
background-repeat: no-repeat;
background-position: center;
height: 60px;
text-transform:;
font-weight: bold;
font-size: 20px;
font-family: cursive;
color: #FFF;
text-shadow: black 0.1em 0.1em 0.2em;
}
/**********/
/* Categories Descriptions */
.block--categoryX .block-desc {
color: #000;
text-transform:;
font-family: monospace;
text-shadow:
   -1px -1px 0 #FFF,
    1px -1px 0 #FFF,
    -1px 1px 0 #FFF,
     1px 1px 0 #FFF;
}
/**********/
This works even better. Gives many options, including the size! Absolutely digging and loving it. Thank you again @Jordyn. I'm sure others will enjoy this too! :)
 
like this?
View attachment 185428

If so. Add to extra.less replacing the X with your ID.
Code:
.block.block--category.block--categoryX .block-container .block-header {
background-image: url('/images/thisimage.jpg');
background-repeat: no-repeat;
background-position: center;  
}
hello, what if I have multiple categories?
And how to keep the mobile version with no image strips?
tks
 
Last edited:
Top Bottom