Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Renamed css file but still uses the copy

Renamed css file but still uses the copy

Locked

Views: 1,083

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
25 Jul 2009, 6:46 PM
#1
fredthefifth avatar

fredthefifth

New Zenner

Join Date:
Jul 2009
Location:
Somerset, UK.
Posts:
70
Plugin Contributions:
0

Renamed css file but still uses the copy

Hi All,

Just starting to get into cascading stylesheets but still very much a beginner!!

I should add that this is on a WAMP server on my XP laptop.

As a backup I copied stylesheet.css to stylesheet_orig.css and then edited stylesheet.css but the settings in the copy were still being picked up.

I removed the copy and then it used stylesheet.css

I tend to make copies like this when I am editing files so can anyone explain what is going on please and if there is anything I can do to prevent this behaviour?

Ta.
FTF

25 Jul 2009, 7:47 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Renamed css file but still uses the copy

Zen Cart automatically loads all stylesheets in the folder according to specific rules. If you want to save a backup copy, name it stylesheet.bak (or pretty much anything but .css).

25 Jul 2009, 7:49 PM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

In the css folder there is a Readme file. You guessed it, I'm going to suggest you read it. :laugh:

It tells you about the way that ZC picks up css files, and the nifty things you can do because of this method. But here's the secret: rename your old file as stylesheet.old because all files that end in .css will be picked up and used.

[ Oops! Glenn beat me to it. But he cheated -- his answer is shorter. ]

Rob

26 Jul 2009, 1:38 AM
#4
fredthefifth avatar

fredthefifth

New Zenner

Join Date:
Jul 2009
Location:
Somerset, UK.
Posts:
70
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

Many thanks to you both.

Presumably I can't do rem statement like this either cos it certainly has a strange effect! How should I do it if I want to keep the old value handy?

A.category-top, A.category-top:visited {
/* color: #008000; /*
color: #966fb5;
text-decoration: none;
}

Regards.
FTF

26 Jul 2009, 4:03 AM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

FredTheFifth:

Many thanks to you both.

Presumably I can't do rem statement like this either cos it certainly has a strange effect! How should I do it if I want to keep the old value handy?

A.category-top, A.category-top:visited {
/* color: #008000; /*
color: #966fb5;
text-decoration: none;
}

Regards.
FTF

Change that to

/*	color: #008000; * /
26 Jul 2009, 9:37 AM
#6
fredthefifth avatar

fredthefifth

New Zenner

Join Date:
Jul 2009
Location:
Somerset, UK.
Posts:
70
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

Hi Mary,

The code didn't copy/paste into my post very well. It was tabbed out like you show, so I'm not sure what you are suggesting.

Regards.
FTF

26 Jul 2009, 11:34 AM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Renamed css file but still uses the copy

Should be :

A.category-top, A.category-top:visited {
/* color: #008000; */
color: #966fb5;
text-decoration: none;
}

The closing rem tag is the opposite of the opening tag. You had them the same.

26 Jul 2009, 11:37 AM
#8
kostiakot avatar

kostiakot

New Zenner

Join Date:
Jul 2009
Posts:
1
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

rstevenson:

In the css folder there is a Readme file. You guessed it, I'm going to suggest you read it. :laugh:

It tells you about the way that ZC picks up css files, and the nifty things you can do because of this method. But here's the secret: rename your old file as stylesheet.old because all files that end in .css will be picked up and used.

[ Oops! Glenn beat me to it. But he cheated -- his answer is shorter. ]

Rob

Thank you for info...:clap:

27 Jul 2009, 9:10 PM
#9
fredthefifth avatar

fredthefifth

New Zenner

Join Date:
Jul 2009
Location:
Somerset, UK.
Posts:
70
Plugin Contributions:
0

Re: Renamed css file but still uses the copy

stevesh:

Should be :

A.category-top, A.category-top:visited {
/* color: #008000; */
color: #966fb5;
text-decoration: none;
}

The closing rem tag is the opposite of the opening tag. You had them the same.

Thanks!!

Yunno, I reckon I could have looked at that for days and not spotted it!!!

Cheers.
FTF