Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sub Category Background

Sub Category Background

Locked

Views: 502

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
1 Nov 2010, 3:29 PM
#1
leest35 avatar

leest35

Zen Follower

Join Date:
May 2010
Location:
London UK
Posts:
134
Plugin Contributions:
0

Sub Category Background

Hi,

On my sub category pages i have a background behind the category icons, as shown here: http://www.pestcontrolonline.com/~pestcont/index.php?main_page=index&cPath=1

The problem is, i have downloaded the site and want to install it on a test server, but when i do that the images are no longer visible. I have check ed the css style sheet and the URL was pointing to my website so i have changed the address to http://127.0.0.1/pest/images/cat_back.png.

But i am wondering if the link is now embeded in a page rather than using the one on a style sheet. I had thei work done for me and so really not sure the structure, is there a page which deals with the category icons. Any help would be appreciated.

Thanks

1 Nov 2010, 4:06 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Sub Category Background

You have an absolute URL in your stylesheet instead of the proper relative URL:

.categoryListBoxContents{
background-image: url(//79.170.43.200/pestcontrolonline.com/images/cat_back.png);
background-repeat: no-repeat;
font-size: 1.5em;
color: blue;
height: 150px;
width: 150px;
padding: 2.5em 0.5em 0.5em 0.5em;
text-align: center ;
background-position: center ;
}

Should be

background-image: url(../images/cat_back.png);
if your bg image is in the /includes/templates/your_template/images/ folder as template images should be, or

background-image: url(images/cat_back.png);
if your image is in the base /images/ folder as you have it (this is intended for product images).

1 Nov 2010, 4:09 PM
#3
leest35 avatar

leest35

Zen Follower

Join Date:
May 2010
Location:
London UK
Posts:
134
Plugin Contributions:
0

Re: Sub Category Background

Ok, this is now sorted, it was down to a backed up stylesheet lurchking in the css folder

1 Nov 2010, 4:16 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Sub Category Background

As you have found, any file that starts with "style" and has a .css extension will be loaded. If you need to keep a backup, save it somewhere else, or give it a .bak extension.

1 Nov 2010, 5:06 PM
#5
leest35 avatar

leest35

Zen Follower

Join Date:
May 2010
Location:
London UK
Posts:
134
Plugin Contributions:
0

Re: Sub Category Background

Thanks, i thought renaming it would be good enough but obviously not, thanks for your help.

Lee