Changing the background

Started by Jack_Nixon, December 01, 2019, 03:55:51 PM

Previous topic - Next topic

Jack_Nixon

Can someone answer me how can i change my themes background into an image and what resolutin to use beacuse everytime i try it doesnt work out

m4z

Which theme are you using? What have you tried?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Jack_Nixon

I have used many themes and i am asking how can i change it i mean the image

Arantor

So which version of SMF are you using?

Also, it really matters which theme you're using as every theme can do it differently.

Jack_Nixon

Im using smf 2.1 and i've tried in the boru theme rdd theme and ux theme tu change the background in index cs but it didnt work out  :(

Arantor

So you changed the background colour... presuming you saved the file back to the server with the new colour in, did you then force your browser to load the new file correctly? Chrome in particular is very good at not doing that.

Ctrl-F5 is usually enough but if not, make sure 'Disable cache' is selected in the network tab of the browser inspector while force-refreshing.

Jack_Nixon

But how can i change the background to an image?

Arantor

Change the colour to url(path-to-image.png) as per normal CSS...

Jack_Nixon

In index cs and it needs to be in the ong format?

Arantor

Yes, in index.css.

No it doesn't have to be png, it can be gif or jpg, but odds are if you end up adding a huge image it'll just annoy people.

Shades.

Quote from: Jack_Nixon on December 01, 2019, 04:17:09 PM
But how can i change the background to an image?
I'm trying to figure this out too (im not a coder, still learning)!

But looking at my default themes index.css using 2.1RC3, what and how do I change the background color to my "images/background.gif"?

Is this the right area and if so which one of the background colors do I change to a url and how?
html {
background: #3e5a78;
}
body {
background: #e9eef2;
font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
color: #4d4d4d;
display: flex;
flex-direction: column;
min-height: 100vh;
}
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Shades.

Quote from: Kindred on March 22, 2021, 08:49:20 PM
Body

Look at what I did here... test2.turtleshellprod.com
Very Nice!

I've tried changing this:
background: #e9eef2;

to this:
background: .../images/background.gif;

but im sure its missing some more code cause its not working?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Sir Osis of Liver



background-image: url(".../images/background.gif");


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Shades.

I changed the code:
Quote
html {
   background: #3e5a78;
}
body {
   background-image: url(".../images/background.gif");
   font: 83.33%/150% "Segoe UI", "Helvetica Neue", "Nimbus Sans L", Arial, "Liberation Sans", sans-serif;
   color: #4d4d4d;
   display: flex;
   flex-direction: column;
   min-height: 100vh;
}
But the background just turned a blueish color!?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Sir Osis of Liver

It's displaying background: #3e5a78;.  The image url is probably incorrect.  Use an absolute path to image, not relative (i.e., http://yourdomain/...........).
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Shades.

Quote from: Sir Osis of Liver on March 23, 2021, 12:06:47 AM
It's displaying background: #3e5a78;.  The image url is probably incorrect.  Use an absolute path to image, not relative (i.e., http://yourdomain/...........).
Ok thanks! I got it to work! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Quote from: Kindred on March 22, 2021, 08:49:20 PM
Body

Look at what I did here... test2.turtleshellprod.com
Hey Kindred how did you make the background stationary?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Kindred

as a hint: If you want to know how someone did something on a site (and you think it's CSS --- which my site is (cruve 2 theme with only MINOR code changes, almost every change was done via CSS) -- use your browser Inspect tool...  :D
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Shades.

Quote from: Kindred on March 24, 2021, 05:39:45 AM
as a hint: If you want to know how someone did something on a site (and you think it's CSS --- which my site is (cruve 2 theme with only MINOR code changes, almost every change was done via CSS) -- use your browser Inspect tool...  :D
Yeah I'm still learning how to do that! Been a way for a couple of years (work work work) and trying to pick up where I left off now that I'm semi-retired but so much has changed and I've forgotten half the things I learned back then but It's coming back slowly...lol!
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Quote from: Sir Osis of Liver on March 22, 2021, 11:39:09 PM


background-image: url(".../images/background.gif");



Changed to background-image: url("https://testsite/images/background.gif"); works on RC3 but doesn't seem to wanna work on RC4!?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

Ok i just figured out that the edits above do work on fresh install of RC4 but is conflicting with the Curve2 Color Changer mod so I'll just have to wait and see if/when that mod gets updated.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Advertisement: