Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Background on CSS will not change when I replace the url.

Background on CSS will not change when I replace the url.

Views: 777

Results 1 to 8 of 8
9 Sep 2011, 8:43 PM
#1
sendmenews avatar

sendmenews

Zen Follower

Join Date:
May 2008
Posts:
122
Plugin Contributions:
0

Background on CSS will not change when I replace the url.

I am trying to change the background of a zencart template. When I go into the stylesheet_tv.css I removed the line that was in the background under the body and under the menu-wrap. I am on a local host so i replaced it with the location of image on my computer, which looks like this. "xampp/htdocs/Zencartgalaxy/images/galaxy.jpg".

The background did remove the color that was initially there, so it is now white, but it will not show my galaxy background.

Does anyone have any thoughts on what I am doing wrong?

9 Sep 2011, 11:34 PM
#2
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Background on CSS will not change when I replace the url.

That isn't the correct Zen Cart path for a background image. It should look like this:

background: url(../images/galaxy.jpg) And the galaxy.jpg should be in /your_template/images.

10 Sep 2011, 12:08 AM
#3
sendmenews avatar

sendmenews

Zen Follower

Join Date:
May 2008
Posts:
122
Plugin Contributions:
0

Re: Background on CSS will not change when I replace the url.

I do not believe i have a " /your_template/images"

Is that something you created and if yes in which folder do you place it? Thanks.

10 Sep 2011, 1:19 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background on CSS will not change when I replace the url.

/your_template/ is whatever the folder name of your template is, and you should make an /images/ folder in it if you don't have one already.

/includes/templates/your_template/images/galaxy.jpg

10 Sep 2011, 1:54 AM
#5
sendmenews avatar

sendmenews

Zen Follower

Join Date:
May 2008
Posts:
122
Plugin Contributions:
0

Re: Background on CSS will not change when I replace the url.

Ironic, I thought it went there but a computer website creator friend told me it did not matter where the image was. So much for that. Anyway, I just moved it, yet the image is still not showing. This is what I have in the background on the CSS page: background: url(../images/galaxy.jpg). I tried it w/ and w/o quotes. Any other ideas on what I might be doing wrong? Thanks again!

10 Sep 2011, 2:23 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background on CSS will not change when I replace the url.

Are you absolutely certain that the actual image is named galaxy.jpg and not Galaxy.jpg or something? Case matters for this.

background: url(../images/galaxy.jpg)

Do you have a semicolon after the value?

background: url(../images/galaxy.jpg);

What does the whole rule look like, exactly?

10 Sep 2011, 2:29 AM
#7
sendmenews avatar

sendmenews

Zen Follower

Join Date:
May 2008
Posts:
122
Plugin Contributions:
0

Re: Background on CSS will not change when I replace the url.

Thank you so very much. I had no semi colon! Now I will be able to sleep tonight instead of me trying all night to fix this.

10 Sep 2011, 2:30 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Background on CSS will not change when I replace the url.

a computer website creator friend told me it did not matter where the image was.For built-from-scratch sites, that is true; and it is possible to call a Zen Cart background image from other locations, but not as simple nor recommended.