News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

how do you change the background color in the defalt theme!

Started by 78brave1, December 17, 2008, 10:29:58 PM

Previous topic - Next topic

sherpa サイバー侍

style.css and few images in images folder of your themes

Antechinus

Err, yeah. Just change some stuff in some files. :P I think something a bit more specific might be helpful.

78brave1, if you are talking about the background to the entire page it is controlled by the body class in your style.css.
Exactly what result are you trying to get?

78brave1

Thank you for your help and one more question is it possable to put a jpeg image in there instead of the hex code .

sherpa サイバー侍

Yes you can but you have to address it jpeg

background: url(images/titlebg.jpg) #E9F0F6 repeat-x;
to
background: url(images/your image.jpeg) #E9F0F6 repeat-x;

Tyrsson

Try something like this... This is from a theme I am doing and maybe it will work similar in yours. But this is where the image must be and the class will be the same.

Note: You may have to change the padding up some to suite your needs as this is just an example

/* set a fontsize that will look the same in all browsers. */
body
{
   font: 95%/90% Verdana, Helvetica, sans-serif;
   background: url(images/yourimage.jpg) #color here repeat-x;
   background-attachment: fixed;
   margin: 0;
   padding: 12px 0 0px 0;
}
PM at your own risk, some I answer, if they are interesting, some I ignore.

Antechinus

It's also worth pointing out that the code required will depend on whether the image is a small repeating image or a large image that should not tile on bigger monitors.

If it is a small image that tiles then Tyrrson's code is basically fine, although it can be tweaked a bit. For instance, all the background properties can be specified in one line like this: 

body
{
   background: fixed url(images/yourimage.jpg) #color here repeat-x;
   margin: 0;
   padding: 12px 0 0 0;
}


The "fixed" attribute is only used if you want the forum to move over a fixed background when scrolling. If you don't require this effect the "fixed" term can be left out. For a large image that doesn't tile the situation is slightly different.

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

78brave1

in what file do i put the imaGE IN AND DO I RENAME IT . CAN NOT GET IT TO WORK.

ThorstenE

when using antechinus solution you must upload the image to Themes/default/images/yourimage.jpg

Advertisement: