Advertisement:

Author Topic: Background  (Read 880 times)

Offline Neverminddw

  • Newbie
  • *
  • Posts: 4
Background
« on: March 30, 2020, 06:49:54 PM »
Hi.
I'm using SMF 2.0.17, and the theme I'm using has a black background, which I wish to replace with an image.

Can someone show me step by step, please?
Thank you!

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,972
  • We were all equal in the end.
Re: Background
« Reply #1 on: March 30, 2020, 09:29:24 PM »
index.css

Code: [Select]

body
{
background: #000 url(../images/galilee3.jpg) no-repeat fixed;
background-size: 100%;
font: 95%/90% Verdana, Helvetica, sans-serif;
margin: 0;
padding: 20px 0 4px 0;
}


You can play with the formatting.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Neverminddw

  • Newbie
  • *
  • Posts: 4
Re: Background
« Reply #2 on: March 31, 2020, 06:48:09 PM »
Thanks for answering, but I still have some unclear things.

So the formatting in my forum's theme is:
Code: [Select]
/* Set a fontsize that will look the same in all browsers. */
body
{
   color: #888;
   background: #0e0e0e;
   font: small Verdana, sans-serif;
   margin: 0 auto;
   padding: 15px 0;
}

I need to upload my background image to "theme/images" folder, that is done.
But how should I replace this code?

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,972
  • We were all equal in the end.
Re: Background
« Reply #3 on: March 31, 2020, 06:53:45 PM »
Code: [Select]

background: #000 url(../images/yourimage.jpg) no-repeat fixed;
background-size: 100%;


That will give you a fixed bg with image displayed once at top filling horizontally.  There are other display options once you get the image working.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns