Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Edwar Colt on April 21, 2023, 08:09:36 PM

Title: Change the background colors
Post by: Edwar Colt on April 21, 2023, 08:09:36 PM
Hello

how to change the background colors of some specific Boards?
Title: Re: Change the background colors
Post by: Kindred on April 21, 2023, 08:12:56 PM
No way that that without a mod or additional themes
Title: Re: Change the background colors
Post by: Edwar Colt on April 21, 2023, 08:37:52 PM
I didn't find a specific mod. the theme is already formatted. a member would like to change the color of the board to match the topic they want to cover. the Forum is dark style, asked me if possible, a blue color for the screen.

And after thinking about it, I thought that the possibility of being able to change the color of certain areas without compromising the layout would be really useful.
I figured I would have some external method after examining the css possibilities and not finding a way to separate the formatting
Title: Re: Change the background colors
Post by: Kindred on April 22, 2023, 01:20:40 AM
In short ...  no
Title: Re: Change the background colors
Post by: Antechinus on April 22, 2023, 02:51:12 AM
Quote from: Edwar Colt on April 21, 2023, 08:37:52 PMI didn't find a specific mod. the theme is already formatted. a member would like to change the color of the board to match the topic they want to cover. the Forum is dark style, asked me if possible, a blue color for the screen.
Sure. Easy. Just needs a few lines of custom CSS added to the end of index.css (or any handy CSS file). Use the relevant board ID as the selector.

For example, take the 'News and Updates' board on this site (first one in the board index). If you want it to have a blue background ...
#board_1 {
    background: blue;
}

If you want the 'Organizational News and Updates' board to be green ...
#board_244 {
    background: green;
}

That's for the board index. If you want something similar on other pages, that can be done too.
Title: Re: Change the background colors
Post by: Edwar Colt on April 22, 2023, 06:04:56 AM
What I managed to understand is that the boards follow a general pre-formatting of the .main_container.

if I reference a specific board in index.css it doesn't seem to know where to find it.

for example:

#board_11 {
    background: blue;
}

does not change anything on board 11
Title: Re: Change the background colors
Post by: webtiryaki on April 22, 2023, 07:26:15 AM
Quote from: Edwar Colt on April 22, 2023, 06:04:56 AMWhat I managed to understand is that the boards follow a general pre-formatting of the .main_container.

if I reference a specific board in index.css it doesn't seem to know where to find it.

for example:

#board_11 {
    background: blue;
}

does not change anything on board 11


#board_11_children  {
    background: blue;
}
Title: Re: Change the background colors
Post by: Edwar Colt on April 22, 2023, 08:14:20 AM
Now yes, the one that changed the internal frame was board_11_childboards

#board_11_childboards {
     background: #0267ba;
}

I think I understand how it works, I'm going to do some more tests and this was really a great discovery. Thanks again for everyone's help
Title: Re: Change the background colors
Post by: Diego Andrés on April 22, 2023, 04:24:34 PM
Quote from: Kindred on April 22, 2023, 01:20:40 AMIn short ...  no

I think both things can be done with css on 2.1
A similar discussion happened here: https://www.simplemachines.org/community/index.php?topic=585521.0
Title: Re: Change the background colors
Post by: Kindred on April 22, 2023, 07:18:38 PM
Hmmmmmmmmmmm...  ok I guess I am incorrect.  ;)
Title: Re: Change the background colors
Post by: DeadMan... on April 22, 2023, 08:10:41 PM
Quote from: Kindred on April 22, 2023, 07:18:38 PMok I guess I am incorrect.

That can happen to us all at some point in time... LOL
Title: Re: Change the background colors
Post by: Edwar Colt on April 22, 2023, 09:11:54 PM
And to close my question, the boards are even better with a background image.

#board_5_childboards {
    background-image: url(img.jpeg);
}