Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Location
    North Carolina
    Posts
    3
    Plugin Contributions
    0

    Default Override Failure in CSS

    I tried to Search for this but the Search feature seems broke. I am putting up a new 1.3.9e zen-cart for the first time. I have had quite a bit of success overriding whatever I wanted to. But, I've hit a dead-end trying to override the font color and background of the .productListing-rowheading and .productListing-heading classes. I have a copy of the original stylesheet.css in my override folder as well as a stylesheet_override.css file which I created which contains only the selectors I want to modify. I have made numerous overrides in this way without a problem. But, these two classes won't budge. Any ideas? Here is the section I'm trying to override:

    TH.productListing-heading a:hover {
    color: #FFFFFF;
    background-color: #A0A040;
    }

    .productListing-rowheading {
    background-color: #F00;
    background-image: url(../images/tile_back.gif); /*TEST*/
    height: 2em;
    color: #0000FF;
    }
    Last edited by tinkerer; 9 Aug 2010 at 01:18 AM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Override Failure in CSS

    Where is your site??
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Override Failure in CSS

    Your first example works fine in my test site if I remove the TD.

    Your second example works fine as is.

    As you probably know, Zencart loads all stylesheets with the .css extension that are in the css folder of the current template. If you have multiple sheets, it's possible that two sheets contain the same element, and one is overriding the other, depending on which loads first.

  4. #4
    Join Date
    Jul 2010
    Location
    North Carolina
    Posts
    3
    Plugin Contributions
    0

    Default Re: Override Failure in CSS

    kobra,
    Please forgive me for not posting the URL. I have not yet secured the site and don't want any public attention. Not everyone is as helpful as you guys.

    Stevesh,
    I have the 2 CSS files in the same dir and I understand that they should load alphabetically. I have many other overrides in the stylesheet_overide.css file that work just fine. It seems that the classes I'm having a problem with are being completely ignored.

    If I make changes to the classes in stylesheet.css I can see the result in the webpage. But, even if I comment out the class in stylesheet.css completely, I still can't get the stylesheet_override.css classes to have any effect.

    I have tried deleting the classes from the stylesheet_override.css and then copy and paste from stylesheet.css to eliminate typos, but no luck.

    I had a couple of questions.
    1. If there is a syntax error in a css, does php stop parsing the file such that selectors after the error are not seen?
    2. Is there a parsing log anywhere that might help identify the issue?

    Thanks for the help. I'm green as grass on CSS and PHP. My previous web experience is all static Frontpage stuff.

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Override Failure in CSS

    1. Not as far as I know.
    2. Not as far as I know.

    When I checked your additions by adding them to stylesheet.css in my test site, they worked as I described, so it almost has to be a conflict with the other stylesheet, or you're placing them in the wrong place in the new stylesheet.

    Stylesheets are applied top to bottom. Occasionally, I'll change something in a sheet, only to have it not affect the page. Usually it turns out that the same selector exists below the place I changed it, and is overriding my changes.

    Save that, one of us will need to see the site - you can PM a link if you want.

  6. #6
    Join Date
    Jul 2010
    Location
    North Carolina
    Posts
    3
    Plugin Contributions
    0

    Default Re: Override Failure in CSS

    I found the problem. There was a missing } about 15 lines above the class I was trying to override. There wasn't anything in between the two that I was watching. I found it by moving the class to the top of the file where it worked fine. Then I brought it down farther in the file until it quit working. Then I found the missing brace. Thanks for the help.

 

 

Similar Threads

  1. CSS override of product description
    By SethF in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 5 Nov 2011, 11:37 PM
  2. css override - index page
    By poosk in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 2 Nov 2007, 11:03 PM

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