Forums / Templates, Stylesheets, Page Layout / How to get style*.css to work?

How to get style*.css to work?

Locked

Views: 906

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
19 Nov 2010, 4:06 PM
#1
pianojoe avatar

pianojoe

New Zenner

Join Date:
Nov 2010
Posts:
6
Plugin Contributions:
0

How to get style*.css to work?

Hi,

I searched for this odd behavior, and didn't find anything in the forum. Could someone please point me towards where I goofed?

To customize the appearance of the store I created a custom template, the appropriate directories and copied the corresponding files from the default template. Theres a file "stylesheet.css" in the "css" folder of my custom template. This is where I apply my tweaks to the CSS, and this WORKS.

Now I really like the idea of having my modifications to the original CSS in a different file, for easy upgrading. The readme in the CSS folder says, that I can create another file along stylesheet.css, named style-something.css, and it should be loaded after stylesheet.css. However, it doesn't load. How can that be? What am I doing wrong?

I'm on 1.3.9h.

19 Nov 2010, 4:17 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: How to get style*.css to work?

pianojoe:

named style-something.css

I think it has to be named stylesheet_something.css. That should work. If not, post the URL of your site and we can take a look.

19 Nov 2010, 8:34 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: How to get style*.css to work?

It must be "style" followed by something, then by ".css".

What's your URL?
Maybe you've named it in a way that's causing it to load before the main stylesheet file, and thus is getting overridden?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Nov 2010, 1:57 AM
#4
pianojoe avatar

pianojoe

New Zenner

Join Date:
Nov 2010
Posts:
6
Plugin Contributions:
0

Re: How to get style*.css to work?

DrByte:

It must be "style" followed by something, then by ".css".

What's your URL?
Maybe you've named it in a way that's causing it to load before the main stylesheet file, and thus is getting overridden?

RESOLVED.

Right you are! I changed the filename from 'stylesheet-1.css' to 'stylesheet_joes_additions.css', and now it works. Don't know why though, but anyway.

Thanks for your help!

21 Nov 2010, 6:07 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: How to get style*.css to work?

The files are loaded alphabetically. If you name it in a way that causes it to load before the main stylesheet, it may get overridden.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Nov 2010, 8:33 AM
#6
pianojoe avatar

pianojoe

New Zenner

Join Date:
Nov 2010
Posts:
6
Plugin Contributions:
0

Re: How to get style*.css to work?

DrByte:

The files are loaded alphabetically. If you name it in a way that causes it to load before the main stylesheet, it may get overridden.

I understand that now. My confusion arose from the fact that the readme states that

The 'stylesheet.css' always loads first and should contain the bulk of your CSS selectors.

which is obviously not true, and should be changed.

21 Nov 2010, 9:56 AM
#7
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: How to get style*.css to work?

It wasn't the actual NAME itself that kept it from loading, but the dash (-) that you used. I believe if you would have used an underscore it would have worked just fine.......stylesheet_1.css.

Try it for yourself. Rename it back to stylesheet_1.css . You'll see that it will work.

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!