XF 1.4 Different backgrounds for different categories?

creativeforge

Well-known member
Hi all,

So I want to match a background color/image for the whole page, that will match these headers.

I've been reading many threads on this trying to figure out how to do it. Most address having different colors in the categories backgrounds. A few suggestions, though, so I've tried this here:

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

body.node8
{
background: #000000 url('path/to/background8.gif') repeat top;
}

I've even tried tweaking it and try a few variants, but... no joy. Am I missing a step, a setting in the Admin, etc.?

Thank you in advance!

Andre
 

Attachments

  • upload_2015-3-21_13-55-20.webp
    upload_2015-3-21_13-55-20.webp
    72.7 KB · Views: 35
Last edited:
The principle is the same.

If you are using pages for categories then the template class is category_view.
You will then need to construct CSS utilising that class and the category node ID.
 
Thanks Brogan, could you give me an example of the code for one such background for the nodes?

body.node8
{
background: #000000 url('path/to/background8.gif') repeat top;
}

li.node.page.level_2.node_146 {background: #ccc;}

None of these seem to work.

Many thanks!
 
category_view?

The principle is the same.

If you are using pages for categories then the template class is category_view.
You will then need to construct CSS utilising that class and the category node ID.

OK, I don't understand what this means: "If you are using pages for categories." I am using what's there, I did not make changes.
 
Couldn't you just create a child style, update the body style property and then assign that style to the category/node?

Make these child styles non-user selectable and you have an easier system to manage I think.

Cheers,

Regs.
 
Back
Top Bottom