how to put an image in the background of SMF...

Josh

Paragon
Joined
Nov 2, 2008
Messages
1,151
Reaction score
0
FP$
1,671
steps:

1. Get your image and upload it to an image hosting website

2. Open themes/default (or whatever theme your using)/style.css

3. Find:

Code:
/* The main body of the entire forum. */
body
{
   background-color: #1e1e22;
   padding: 12px 30px 4px 30px;
   width: 90%;
   margin: 0px auto;
}

replace with:

Code:
/* The main body of the entire forum. */
body
{
   background-color: #1e1e22;
   background:url("@");
   padding: 12px 30px 4px 30px;
   width: 90%;
   margin: 0px auto;
}

4. Replace the @ with the url of the image.

5. Save the file and you've got a background image.
 
Thanks for this

a question, when adding the image, will it tile automatically?, if so how can we stop it from tiling?


or if it is a seamless background, how can we make it not stretch?
 
yes, the background will tile automatically.

To stop this, you can use this code instead:
Code:
/* The main body of the entire forum. */
body
{
   background-color: #1e1e22;
   background:url("@");
   background-repeat: none;
   padding: 12px 30px 4px 30px;
   width: 90%;
   margin: 0px auto;
}
 
Back
Top Bottom