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

XF 1.2 different background on different categories

Discussion in 'Styling and Customization Questions' started by gasg, Jan 23, 2014.

  1. gasg

    gasg Member

    Im trying to do what the title says.

    I google it and found this


    and this


    the first one just confuses me I don't see how it can help me, so Im focusing on the second link mostly

    So according to this I just upload my wallpaper I want to have to my server and just point it to the correct node ?which is the number after the name I assume ?

    Or am I complete wrong with this ? can someone explain me the correct way to do this ?
  2. katsulynx

    katsulynx Well-Known Member

    So you want Background A if you enter a Forum located in Category A and a Background B to be shown when in a Forum in Category B? No need to use conditinal statements then, just use body.node_X where X is the ID of the forum and assign the right background to it.
  3. gasg

    gasg Member

    Yes I have lets say in one category called "sports"

    Under it there are two categories (nodes) football and basketball, so these two will have different background.

    Im not 100% how do I assign that, I google that also I think this result is more helpfull for me http://xenforo.com/community/threads/set-different-body-background-for-each-forum-css.24511/

    Is this the correct way for my need ?

    so the body.node2 will be the category I want and the background path I uploaded ?

    Do I need the

    background: #123456 url('path/to/background2.gif') repeat top;

    or can I do it
    background: url('path/to/background2.gif') repeat top;
  4. James

    James Well-Known Member

    You can use the node class to assign a background via CSS, or, alternatively, override the user's style choice (by editing the node in question) and create another style that has that background image.
  5. katsulynx

    katsulynx Well-Known Member

    background: url('path/to/background2.gif') repeat top;
    Is enough. As long as you set the picture to repeat in all directions, it will be over the color anyway, if you have set one. Your css-classes are correct as long as they have the IDs you want.
    gasg likes this.
  6. gasg

    gasg Member

    Ok I have uploaded the image I want ( 1920x1080)

    and I added the code on the extra.css

    background: #123456 url('path/to/background2.gif') repeat top;

    but it seems nothing really changes, so I probaply missing something.

    the other solution James game me it looks easier with the extra styles but I want to do this with many different categories and it looks messy with so many styles.

Share This Page