Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    I can't seem to get this working for EZ Pages.

    I have a page "index.php?main_page=page&id=6"

    Should I use page_name.css or c_??_??.css and how should it be named?

    Any help would be much appreciated.

  2. #12
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Different CSS for Different Pages, and Products

    Quote Originally Posted by jaygee View Post
    I can't seem to get this working for EZ Pages.

    I have a page "index.php?main_page=page&id=6"

    Should I use page_name.css or c_??_??.css and how should it be named?

    Any help would be much appreciated.
    This mod from the downloads section will probably do the trick.

  3. #13
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    Many Thanks.

    Should have searched the download section!

    I'll give it a go.

  4. #14
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Different CSS for Different Pages, and Products

    Quote Originally Posted by jaygee View Post
    Many Thanks.

    Should have searched the download section!

    I'll give it a go.
    Once you installed it you can name and use stylesheets as follows

    ezpage_10.css
    chapter_1.css

  5. #15
    Join Date
    Jul 2009
    Location
    Maryland
    Posts
    65
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    Quote Originally Posted by rstevenson View Post
    Certainly the p_1.css should have worked. For example, one of my category pages is iddentified by this in the browser's address bar (after the site URL itself, of course) ...
    .../index.php?main_page=index&cPath=17

    So p_17.css will be the page-specific stylesheet for that category.

    But the only EZ page I use has this in the address bar...
    index.php?main_page=page&id=1&chapter=0

    I'm not sure, from that, how to name the EZ page's stylesheet.

    I will experiment and get back to you.

    Rob
    Hi,

    I'm trying to change the background and text color for specific categories. Following your example above for page ".../index.php?main_page=index&cPath=17", I created a p_17.css and uploaded to the server and it does not work. How is the p_17.css get called? do I need to call it somewhere?

  6. #16
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    p_17.css would be the stylesheet for product #17, not for category #17 (contrary to what I wrote up above.) For category you use the pattern c_??_??.css, as explained in the Readme file in your css folder. To take an example from my retail site, the Humour category is addressed like this...
    ../index.php?main_page=index&cPath=78

    So a category specific stylesheet for the Humour category would be named c_78.css. (The extra _?? part is for sub-categories if you need it.) (Just tested that and it does work.)

    Zen Cart automatically loads all valid stylesheets in the css folder and uses them. It has code to determine that it should only use a category stylesheet in that category.

    I hope that clarifies a little more.

    Rob

  7. #17
    Join Date
    Jul 2009
    Location
    Maryland
    Posts
    65
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    Quote Originally Posted by rstevenson View Post
    p_17.css would be the stylesheet for product #17, not for category #17 (contrary to what I wrote up above.) For category you use the pattern c_??_??.css, as explained in the Readme file in your css folder. To take an example from my retail site, the Humour category is addressed like this...
    ../index.php?main_page=index&cPath=78

    So a category specific stylesheet for the Humour category would be named c_78.css. (The extra _?? part is for sub-categories if you need it.) (Just tested that and it does work.)

    Zen Cart automatically loads all valid stylesheets in the css folder and uses them. It has code to determine that it should only use a category stylesheet in that category.

    I hope that clarifies a little more.

    Rob
    Rob,

    You are the man!! (never thought I was going to used that term).

    Yes! naming the sheet c_?_?.css does change styles just for that category. You have save me many hours of work!!

    Thank you!!!

    JE

  8. #18
    Join Date
    Jul 2009
    Location
    Maryland
    Posts
    65
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    Rob,

    Do you know how to get around the following css bug in IE7 and older. It seems to work fine in IE8, FF and Chrome.

    I define a different font style color for the main bottom div for a specifc category in my c_?,css, to be white. In all other pages the main bottom is define in stylesheet.css, font is black.

    When view in IE8,FF and Chrome, it behaves like it should, font color for specific category is white, all others black.

    In IE7 specific category font color appears white. All other the font appears black for couple of seconds, then it turns white. (it seems the browser loads the c_?.css first then overwrites it with sytesheet.css.)

    Any ideas?

    below is the test site to visualize the problem (note must view it in IE7 to see the problem)

    http://www.webdexign.com/cart/index....dfbea43b39ca4c

  9. #19
    Join Date
    Jul 2009
    Location
    Maryland
    Posts
    65
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    Never mind.. found out it was my sheet the problem.

  10. #20
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    160
    Plugin Contributions
    0

    Default Re: Different CSS for Different Pages, and Products

    hi everyone!
    im using 1.3.8.

    Thanks for those tips! I really does overrride!

    however, I could not figure out how to change the white colour to an image for a background. When I put

    background-image:url(../images/greatIn_aboutUs.png);

    it only changes the back BACK image. I don't want that. How can I solve this problem? I have been ad this for quite awhile and it's becoming frustrating.


 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Different redirect pages for different products
    By TerenceWatts in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 18 Feb 2013, 08:21 PM
  2. Can I use different css for different languages?
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 25 Apr 2012, 07:27 AM
  3. Different CSS for EZ Pages
    By markpr9 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Apr 2009, 11:09 PM
  4. how to get different header for different pages? - Without CSS
    By markpr9 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Apr 2009, 04:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR