Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / products dividing line

products dividing line

Locked

Views: 2,503

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
12 Feb 2008, 1:10 AM
#1
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

products dividing line

Ok I am trying to get my product listing page to look like http://shop.forge-games.co.uk/units-53-c.asp

Right now I have a single line dividing each product

12 Feb 2008, 7:06 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

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

Re: products dividing line

Well, I'm kind of guessing at your intent, but here goes...

Look in your style sheet for the two definitions called

.productListing-odd
.productListing-even

Apply a border to those classes, and give them margins to space them away from each other as needed.

Rob

Breakfast: the most important donut of the day.

13 Feb 2008, 7:33 AM
#4
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: products dividing line

ok RT close to what I wanted but perhaps I was off on the explaination the only line I could find close to whay you were suggesting was this

/Product Listing/
.productListing-data {
border-top: 1px solid #000000;
padding: 0.50em 0em 0.50em 0em;
}

The look again I was going for was this http://shop.forge-games.co.uk/units-53-c.asp

i the center the way each product has a box around it. to me this looks cleaner than the sigle line I have on mine http://darktowerhobbies.com/index.php?main_page=index&cPath=3_15_11

I hope I have clarified this

13 Feb 2008, 2:12 PM
#5
rstevenson avatar

rstevenson

Totally Zenned

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

Re: products dividing line

You will need to style the two classes I mentioned...

.productListing-odd
.productListing-even

If they're not in your style sheet now, just add them and style as directed. Not all the styles available in the Zen code are actually in the style sheet. They're in the code so you can use them if you need to.

Here's how I've styled them in one of my sites. This gives two different background colors for the alternating listings...

.productListing-even { background-color: #DFECF8; }
.productListing-odd { background-color: #E6F0D2; }

As you can see I haven't used any margin because I wanted them to snug up to each other. And I didn't need the padding mentioned above by gjh42 because, I guess, the elements within each row have their own margins already. (There are many ways to reach the same goal.)

You probably want something like...

.productListing-even, .productListing-odd {
background-color: white;
border-color: black;
border-width: 2px;
margin: 5px;
padding: 5px;
}

Adjust to taste.

HTH

Rob

Breakfast: the most important donut of the day.

13 Feb 2008, 7:02 PM
#6
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: products dividing line

I added everything you suggested and nothing happened no border ever appeared no matter what I did.

I sort of got it going by adding the border bottom to the style sheet

.productListing-data {
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
/* padding: 0.50em 0em 0.50em 0em;*/
}
but I can't separate them or make a border appear on the left or right side.

14 Feb 2008, 2:29 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

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

Re: products dividing line

You're right, sort of. :blink:

When I add my first example to your stylesheet, the one with just a different color for each row, the colors change immediately on your page. (I'm using Firebug to do that. Don't worry, it only changes here in my browser.)

But when I put in my second example, nothing happens. This tells me that something else is over-riding the changes. Any chance you have more than one stylesheet in use?

Rob

Breakfast: the most important donut of the day.

15 Feb 2008, 2:46 AM
#8
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: products dividing line

I am using a template glass black I got it on here

15 Feb 2008, 3:30 AM
#9
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: products dividing line

sorry typo gloss black

15 Feb 2008, 4:13 AM
#10
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: products dividing line

For Borders around Product Listings, see if this works for you.

.productListing-data {
padding: 10px;
border: 1px solid black;
}

If you wanted to use different colors for each product then use:

.productListing-even {
padding: 10px;
border: 1px solid black;
}

.productListing-odd {
padding: 10px;
border: 1px solid grey;
}

A good habit to get into when adding new declarations is to put them at the bottom of your Stylesheet, then you know they come last.

The learning is in the doing.

Potent Products

15 Feb 2008, 4:51 AM
#11
darktowerhobbies avatar

darktowerhobbies

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: products dividing line

ok now I have both horizontal and vertial lines how do I get rid of the vertical on the inside I want the ones on the outside

here is the url

15 Feb 2008, 1:34 PM
#12
rstevenson avatar

rstevenson

Totally Zenned

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

Re: products dividing line

Looks like you have your borders applied to productListing-data. You need to put the style definition in productListing-odd and -even to style the entire row. the -data style applies to each block in the row.

Your product listings are in a table. Each row of the table (TR) is styled with productListing-even or -odd. Each cell of the table (the TDs) is styled with productListing-data. So when you style the cells you get multiple borders in each row, as you have now. When you style just the row, you get a border around just the row.

Rob

Breakfast: the most important donut of the day.