News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How do i add a image on my theme?

Started by skatzi, March 03, 2012, 05:15:07 PM

Previous topic - Next topic

skatzi

I am in need of a new background and i was wondering how do i add a new background from my theme.

cybergamers.org <--- i am using the theme vertex.

Eudemon

open your index.css
find
body {
background: url("public_html/Themes/Vertex-Theme2-0-2-v1-2/images/back.jpg")

replace the url to the image url you want

skatzi

Quote from: Eudemon on March 03, 2012, 05:28:54 PM
open your index.css
find
body {
background: url("public_html/Themes/Vertex-Theme2-0-2-v1-2/images/back.jpg")

replace the url to the image url you want
It didn't change it? I tried and didn't work.

Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

skatzi

Quote from: Runic on March 03, 2012, 05:37:04 PM
what did you change it too?
body
{
   background: url("http://i.imgur.com/ctSjd.png [nofollow]")

Then i tried

body
{
   background: url("images/back2.jpg")

Deaks

ok if you have the image in your image directory you need to link it slightly different try
   
background: url(../images/back2.jpg);

you may also wanna expand it wee bit
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

skatzi

Quote from: Runic on March 03, 2012, 05:52:58 PM
ok if you have the image in your image directory you need to link it slightly different try
   
background: url(../images/back2.jpg);

you may also wanna expand it wee bit
Ok that worked. Now after i do that i saved and it didn't change? Would i need to clear my cache on the site?

Deaks

yes but this will only work if the image is in your themes images folder
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

skatzi

Quote from: Runic on March 03, 2012, 06:00:38 PM
yes but this will only work if the image is in your themes images folder
It is! Thats the weird part. its in my /themes/vertex/images/

I also put it in the /themes/vertex/images/theme

Eudemon

#9
it depends where you put your image in your custom theme's folder
"../folder you put it/your_image_name.extension"

skatzi

Quote from: Eudemon on March 03, 2012, 06:07:59 PM
it depends where you put your image in your custom theme's folder
"../folder you put it/your_image_name.extension"
I realize this. I put it in public_html/Themes/Vertex-Theme2-0-2-v1-2/images/theme/   
and also my /public_html/Themes/Vertex-Theme2-0-2-v1-2/images/ 

Now correct me if i am wrong but it wants me to get the image from here body
{
   background: url(../images/back2.jpg)

which is where i placed it. Now when i click save, jack happens. Everything stays the same.

Deaks

can you post the exact code you added (the whole body tag)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

steveraven

There's a far simpler method that I use -

Go into your forums images folder and find the background image and note the exact name, then rename it to something else (I just add a number to the end of its name)

Upload your required background image into your forums images folder and rename it to the original name of the background image that you just changed.

That should sort it!

Deaks

or we can find out the exact issue and help someone learn code :)
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

BlondChick


Eudemon

Quote from: skatzi on March 03, 2012, 06:15:24 PM
Quote from: Eudemon on March 03, 2012, 06:07:59 PM
it depends where you put your image in your custom theme's folder
"../folder you put it/your_image_name.extension"
I realize this. I put it in public_html/Themes/Vertex-Theme2-0-2-v1-2/images/theme/   
and also my /public_html/Themes/Vertex-Theme2-0-2-v1-2/images/ 

Now correct me if i am wrong but it wants me to get the image from here body
{
   background: url(../images/back2.jpg)

which is where i placed it. Now when i click save, jack happens. Everything stays the same.
try this
{
   background: url("../images/back2.jpg");

Advertisement: