MyBB Community Forums

Full Version: Image bg for a specific category
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello i;ve tried to follow this tutorial : https://community.mybb.com/thread-217464.html
 but i still cannot make it to show a background for a specific forum 
Version mybb 1.8
board : estrike.ro/forum
in your global.css stylesheet replace #forum_cat_2 with #forum_cat_26

#forum_cat_2 represents forum 2
#forum_cat_26 is for forum 26

after saving changes to the stylesheet,
hard refresh your browser [eg. press CTRL + F5] to see the changes
i've done that already still nothing change
looks like you have mistaken in adding the codes ! please check the tutorial once again .. [image link]
Quote:You can set one ID for all forums and add just one code to CSS, in that case all Forums will have same background image.

It looks like you did this part too. Do everything except the last change.
still...
You're using a class="" with a CSS definition as well as an id with a CSS definition.
The class {bgcolor} overrides your background-image/position!

Just do the following switch of positions to override the {bgcolor} definition:
<td class="{bgcolor}" id "forum_cat_26"...
So id will override class.

[ExiTuS]
(2020-01-27, 09:25 AM)[ExiTuS] Wrote: [ -> ]You're using a class="" with a CSS definition as well as an id with a CSS definition.
The class {bgcolor} overrides your background-image/position!

Just do the following switch of positions to override the {bgcolor} definition:
<td class="{bgcolor}" id "forum_cat_26"...
So id will override class.

[ExiTuS]
1. You missed the dollar sign in the bgcolor variable.
2. Your browser console does not list any CSS definition (on the right hand side) for your #forum... definition. Are you sure to have changed the correct CSS?

As an alternate get rid of the id and just use inline style to the category like this (try this for testing purpose):

<td class="{$bgcolor}" style="background: url(../../../imagesBlackPlayers/cs.jpg) 0 0 no-repeat;" ...>...</td>

[ExiTuS]
(2020-01-27, 09:50 AM)[ExiTuS] Wrote: [ -> ]1. You missed the dollar sign in the bgcolor variable.
2. Your browser console does not list any CSS definition (on the right hand side) for your #forum... definition. Are you sure to have changed the correct CSS?

As an alternate get rid of the id and just use inline style to the category like this (try this for testing purpose):

<td class="{$bgcolor}" [b]style="background: url(../../../imagesBlackPlayers/cs.jpg) 0 0 no-repeat;"[/b] ...>...</td>

[ExiTuS]
The css are listed in global.css at the bottom i've attached an image above
whn i try only with this 
<td class="{$bgcolor}" style="background: url(../../../imagesBlackPlayers/cs.jpg) 0 0 no-repeat;" ...>...</td> ( i've deleted those dots at the end)
it gives me this :
Pages: 1 2