Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Quick stylesheet question

Quick stylesheet question

Locked

Views: 875

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
19 Jan 2009, 12:42 AM
#1
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Quick stylesheet question

HI guys,

I am of the understanding that there is only one stylesheet for the entire site, is this correct?

Cheers,

Brendan

19 Jan 2009, 1:46 AM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Quick stylesheet question

Zencart installs two stylesheets by default - the main stylesheet and one for the CSS buttons.

Many mods install their own.

You can have (and Zencart will load) as many as you want, but you need to take care they don't conflict with one another, and you can style the whole site with just the main stylesheet.

19 Jan 2009, 2:39 AM
#3
rstevenson avatar

rstevenson

Totally Zenned

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

Re: Quick stylesheet question

And you can have a print stylesheet for turning off things like the sideboxes and large graphics, in case anyone wants to print a page of your site. And an IE-specific stylesheet for bug fixes maybe. And you can use Zen Cart's clever method of loading stylesheets to create page- or category-specific stylesheets so you can style a particular part of your site differently if you'd like.

But yes, one stylesheet can do the whole thing, and usually there is only one main stylesheet.

Rob

19 Jan 2009, 3:49 AM
#4
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Re: Quick stylesheet question

Thanks guys.

If you create your own style sheet...say "mystyle.css", where do you modify the code so that this sheet is used in lieu of stylesheet.css?

Or is it easier to just modify the existing stylesheet.css and save as I go.

19 Jan 2009, 5:55 AM
#5
afo avatar

afo

Totally Zenned

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

Re: Quick stylesheet question

There's a text file in includes/templates/classic/css that explain show Zen Cart loads stylesheets.

19 Jan 2009, 3:27 PM
#6
rstevenson avatar

rstevenson

Totally Zenned

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

Re: Quick stylesheet question

If you create your own style sheet...say "mystyle.css", where do you modify the code so that this sheet is used in lieu of stylesheet.css?
Just be sure to remove or rename the stylesheet.css file. Renaming means removing the .css ending, since any .css file in the css folder can be used by ZC. So if you want to start fresh with mystyle.css, then rename the default one to stylesheet.old or something like that. Or just keep a copy of it locally and delete it from the server.

As for which approach to take, I'd suggest using stylesheet.css as the basis of your template, since it contains so many basic things you'd need to duplicate anyway. But work on a copy and rename the original as said above.

Rob