Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to ?? Alternate Product Listing BG Color

How to ?? Alternate Product Listing BG Color

Locked

Views: 2,400

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
26 Aug 2008, 9:01 PM
#1
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

How to ?? Alternate Product Listing BG Color

How can one go about alternating the colors of the Product Listings when they are in rows, like the example I've attached to this post.

26 Aug 2008, 9:45 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Stylesheet - look for productListing-odd and/or productListing-even ( could be another style, but it will say *odd or *even)

26 Aug 2008, 10:37 PM
#3
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Kim:

Stylesheet - look for productListing-odd and/or productListing-even ( could be another style, but it will say *odd or *even)

The only odd or even in my stylesheet.css is:

.rowOdd {
background-color : #e8e8e8;
height : 1.5em;
vertical-align : top;
}
.rowEven {
background-color : #f0f0f0;
height : 1.5em;
vertical-align : top;
}

and as you can see, already has different colors, but doesn't effect the product listing.

26 Aug 2008, 10:42 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

On which URL?

26 Aug 2008, 10:46 PM
#5
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

My sig below is the only site I have right now, so I assume that one is the one we are talking about. I simply opened up my stylesheet.css file and searched.

But, here is an example page from my site:
Example Page

26 Aug 2008, 10:59 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Use your FireFox toolbar to see what styles are available on the page, they may not be in your stylesheet. The .productListing-odd is available add it and style it.

26 Aug 2008, 11:13 PM
#7
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Looks like that's gonna work Kim. Thanks a million. Dontchya just LOVE Firefox?:hug:

26 Aug 2008, 11:27 PM
#8
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Take a look Kim! It worked. Thanks!:bigups::hug:

26 Aug 2008, 11:35 PM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

:thumbsup:

26 Aug 2008, 11:51 PM
#10
wtashby avatar

wtashby

Totally Zenned

Join Date:
Feb 2006
Posts:
594
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

For anyone else that would like to do the same thing, and make your product listings rows alternate colors, here is the code I used:

insert pretty much anywhere in your includes/templates/YOUR-TEMPLATE/css/stylesheet.css (I just added it to the very bottom of mine)

for odd rows

.productListing-odd {
background-color : #eeeeee;
}

or for the even rows

.productListing-even {
background-color : #eeeeee;
}

and substitute #eeeeee for whatever color flies your flag.

Have fun!:cheers:

8 Jun 2009, 6:57 PM
#11
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

I've added to my css file:

.productListing-odd {
background-color : #ffffff;
}

.productListing-even {
background-color : #EBEBEB;
}

I guess I need to define this new css style now in the template. Is it product_listing.php?

Could someone post example of where updated tag should go and what it would look like.

Thanks!

8 Jun 2009, 8:14 PM
#12
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How to ?? Alternate Product Listing BG Color

They should already be available in the code. No need to add them. There are lots of classes in the code which are not defined in the default stylesheet. They're there so we can use them if we want to.

If productListing-odd and productListing-even are not in your code (View Source in your browser on a product listing page) then post a link to your site so we can have a look.

Rob

9 Jun 2009, 3:15 AM
#14
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,808
Plugin Contributions:
15

Re: How to ?? Alternate Product Listing BG Color

Both odd and even are in your php but missing from your stylesheet for some reason.

9 Jun 2009, 3:30 AM
#15
scottdev avatar

scottdev

New Zenner

Join Date:
Dec 2008
Location:
San Diego, California
Posts:
54
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

I had the code in stylesheet.css.

Guess it goes in stylesheet_css_boxes.css

Now it works.

14 Mar 2010, 3:14 PM
#16
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

Is there a switch for this? If not, why not?

15 Mar 2010, 11:35 PM
#17
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How to ?? Alternate Product Listing BG Color

A switch for what?

Rob

16 Mar 2010, 12:04 AM
#18
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: How to ?? Alternate Product Listing BG Color

See title of thread

16 Mar 2010, 10:01 AM
#19
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How to ?? Alternate Product Listing BG Color

I know what the thread is about, but your question lacks clarity and specificity. Think it through, describe what you think could/should happen, then ask for it or ask why it isn't there. Bear in mind that a rewrite of the admin interface is on the road map for some future version.

Rob