changing background color

Re: changing background color

by Mary Evans -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Ciao Luciano,

Si certo...

If you checkout the 'source code' for the page like I did here you can find the 'body class' of the category.

In this forum it is category-3 see here...

<body id="page-mod-forum-discuss" class="format-topics path-mod path-mod-forum gecko dir-ltr lang-en yui-skin-sam yui3-skin-sam moodle-org pagelayout-incourse course-5 context-115 cmid-46 category-3 two-column has-region-side-post used-region-side-post side-post-only jsenabled has_dock has_dock_left_vertical">

So you can set these out in your theme CSS like so and there is no need to add body.category-3 { background-color: red } as these CSS selectors are already body classes.

.category-2 { background-color: red }
.category-3 { background-color: orange }
.category-4 { background-color: yellow }
.category-5 { background-color: green }
.category-6 { background-color: blue }
.category-7 { background-color: indigo }
.category-8 { background-color: violet }

Hope this helps...

Average of ratings: Useful (1)