Forums / Templates, Stylesheets, Page Layout / How to change row color in shopping cart?

How to change row color in shopping cart?

Started by servelan on 27 Jan 2012, 5:45 AM · Views: 751

Results 1 to 5 of 5
27 Jan 2012, 5:45 AM
#1
servelan avatar

servelan

New Zenner

Join Date:
Apr 2011
Posts:
45
Plugin Contributions:
0

How to change row color in shopping cart?

In my stylesheet.css in my template folder structure, I have the following standard code for the shopping cart rows with the obvious attempted tweaks:

.rowOdd {
/ background-color: #666666; too-dark grey
background-color: #c0c0c0;
height: 1.75em;
vertical-align: top;
}

.rowEven {

/ background-color: #ffffff; too-stark white
background-color: #95c6c7;
height: 1.75em;
vertical-align: top;
}
/note that first row is 0, not 1, and therefore even

Took me a while to figure out that the first row is 0 and not 1 so I made a note of it. :blush:

I've found that trying to change the color of the rows from something other than white or a shade of grey results in no color at all with my background showing through. So, neither of my specified colors above show up as row colors. Since I have a patterned background, that's kind of distracting.

Is there some place besides the stylesheet.css in my template folder I need to look at to change the shopping cart row colors?

27 Jan 2012, 12:05 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: How to change row color in shopping cart?

You don't comment CSS using a slash before the element. The comment needs to be inside /* content here */

Try removing the original background-color.

27 Jan 2012, 12:38 PM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: How to change row color in shopping cart?

Servelan:

.rowOdd {
/ background-color: #666666; too-dark grey
background-color: #c0c0c0;
height: 1.75em;
vertical-align: top;
}

.rowEven {

/ background-color: #ffffff; too-stark white
background-color: #95c6c7;
height: 1.75em;
vertical-align: top;
}
/note that first row is 0, not 1, and therefore even

take above code and replace with:

/*
note that first row is 0, not 1, and therefore even
*/
#cartContentsDisplay .rowEven {
background:#c0c0c0;
height: 1.75em;
vertical-align: top;
}

#cartContentsDisplay .rowOdd {
background:#95c6c7;
height: 1.75em;
vertical-align: top;
}

hope this helps

28 Jan 2012, 12:38 AM
#4
servelan avatar

servelan

New Zenner

Join Date:
Apr 2011
Posts:
45
Plugin Contributions:
0

Re: How to change row color in shopping cart?

Now my stylesheet.css file code reads thus, and looks the way I want it to:

.rowOdd {
background-color: #95c6c7;
height: 1.75em;
vertical-align: top;
}

.rowEven {
background-color: #c9dee1;
height: 1.75em;
vertical-align: top;
}

Apparently, part of my problem is that I was trying to effect the change in the wrong place. The bit that affects this is under /misc/ and not earlier in the file as I thought it was.

28 Jan 2012, 12:19 PM
#5
stevesh avatar

stevesh

Black Belt

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

Re: How to change row color in shopping cart?

Since stylesheets are read from top to bottom, it doesn't matter where in the stylesheet you add your changes, as long as that same rule doesn't appear again below the changed rule.