Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Product List - Spacing issue

Product List - Spacing issue

Locked

Views: 4,435

Results 1 to 20 of 30
This thread is locked. New replies are disabled.
20 Apr 2007, 7:15 PM
#1
stuffedpretzel avatar

stuffedpretzel

New Zenner

Join Date:
Dec 2005
Posts:
13
Plugin Contributions:
0

Product List - Spacing issue

I hope I am placing this question in the right place... I have read and re-read until my eye's hurt... so I am going to ask this one question.

Where/what file is it that I need to modify and where in that file to increase the space between the images displayed on the product list page.

I would like to increase the size of the images and I know to do that in Admin, but when I do that the product list page gets all funky so I would like to try and fix that.

Here is a link to the site http://www.stuffedpretzel.com/store/index.php?main_page=index&cPath=1 - Notice how close the images are???

Please be gentile, I am so green at this... have been working on it for days... guess you could say I am a Donkey on the edge... Shrek!

Thanks for you help

20 Apr 2007, 8:04 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product List - Spacing issue

Add to your stylesheet

.productListing-data {padding: .8em .3em;}

Adjust to your liking.

20 Apr 2007, 8:06 PM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product List - Spacing issue

This can be controlled with the css styles in the stylesheet.css file for your template that is currently "classic" and you ahould create your own but that is another subject:

Search and Find this tag in stylesheet.css or add it if you do not find it, if it is there and nested with other tags seperate it out into it's own entry and adjust the padding value to suit

.productListing-data {
padding-bottom: 3em;
}
20 Apr 2007, 8:12 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product List - Spacing issue

Note: the second value in

padding: .8em .3em;

is for left and right sides, and will give you some breathing room between your text and image.

And yes, you want to make your own template folder so your hard work doesn't get erased when you upgrade to the next version of Zen Cart.

20 Apr 2007, 8:54 PM
#5
stuffedpretzel avatar

stuffedpretzel

New Zenner

Join Date:
Dec 2005
Posts:
13
Plugin Contributions:
0

Re: Product List - Spacing issue

Thanks much! I am off to play around

20 Apr 2007, 9:06 PM
#6
stuffedpretzel avatar

stuffedpretzel

New Zenner

Join Date:
Dec 2005
Posts:
13
Plugin Contributions:
0

Re: Product List - Spacing issue

Giddy Up! that worked perfectly... ok so one more quick question and I think I am done.

Where would I set the description margin... so that it doesn't push the right sideboxes off the page?

http://www.stuffedpretzel.com/store/index.php?main_page=index&cPath=1

Thanks so much for your help today you guys are awesome!

20 Apr 2007, 9:23 PM
#7
stuffedpretzel avatar

stuffedpretzel

New Zenner

Join Date:
Dec 2005
Posts:
13
Plugin Contributions:
0

Re: Product List - Spacing issue

Ohhhh... I figured it out! Thanks.

20 Apr 2007, 10:09 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product List - Spacing issue

For general enlightenment...
I had noticed that earlier. The immediate cause of the description pushing the right sideboxes out was a long unbroken string of letters typed in as a placeholder. By default, the description will be sized to fit in the space available, but a long word can mess that up.

...or was it? It might have been another site I saw that particular problem on today :)

20 Apr 2007, 10:18 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product List - Spacing issue

Yes it was: jkfldjslkfjd;lskaflsdja;lkjfdlskjflkdjs;alkjfdlskjflfkdjslfkjdlskjflksdjlfk

;)

24 May 2007, 10:12 AM
#10
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Re: Product List - Spacing issue

Hi,

I tried adding the snippet css code to my stylesheet (and increased the padding values) but it does not work. The images are still very close together.

Cab you please help me?

Hansi

24 May 2007, 3:59 PM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product List - Spacing issue

hansi,

Post your url

25 May 2007, 8:35 AM
#12
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Re: Product List - Spacing issue

Hi Kobra,

Thanks for responding to my query. I am testing the code on a local machine so I can post you the stylesheet, a screenshot of the product listing page, (and any php pages you need) instead?

Regards,

Hansi

25 May 2007, 5:49 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product List - Spacing issue

Transfer it to a hosting account

8 Jun 2007, 1:00 PM
#14
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Re: Product List - Spacing issue

Hi Kobra,

I have finally managed to transfer it to a hosting account.

Here is the URL:

As you can see there is no horizontal spacing at all between the 4 product images (e.g. Accompanied Visits, Filling-in forms, etc.).

I tried different combinations for the css code to increase the horizontal spacing. Here is one combination:

.productListing-data {padding: .8em .3em; padding-bottom: 3em;}

Thanks in advance for your informative help,

Hansi

8 Jun 2007, 1:06 PM
#15
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Re: Product List - Spacing issue

Kobra: I tried now and it works so please ignore my previous message.

thanks,

HAnsi

8 Jun 2007, 4:36 PM
#16
ahroo avatar

ahroo

New Zenner

Join Date:
Jun 2007
Posts:
16
Plugin Contributions:
0

Re: Product List - Spacing issue

Thanks for the info previously given in this post - just what I've been searching for for the past few days!!

Another question about a similar issue: how do I put a thin line between the various product items to further distinguish where one ends and the next one begins (such as would be done with the <HR> tag in HTML)?

Or, as an alternative, how can I use a different color background for each item (including photo and all text related to the item), as I could do in a table? An example of what I mean can be found at:
http://www.casadobosque.pt/index.php?main_page=index&cPath=34&zenid=5d7ec2e2977da164fb53e9c98bcfc8f1

Thank you in advance!

Laura

8 Jun 2007, 4:45 PM
#17
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product List - Spacing issue

Ahroo,

And your url to this page is?? Not an example but your site

8 Jun 2007, 5:58 PM
#19
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Product List - Spacing issue

Try adding this to your stylesheet and adjust to suit:

.productListing-data {
        padding-top: 3.5em;
        border-bottom: 2px solid #000000;
        }

.productListing-odd, .upcomingProducts-odd, .productFeatured-odd {
        background: #9a9a9a;
        }

.productListing-even, .upcomingProducts-even, .productFeatured-even, .productsNotifications {
        background: #FFFFFF;
        }
8 Jun 2007, 6:07 PM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product List - Spacing issue

Both of these questions are answered in the Adding space in between items thread.

Ninja'd! That's what I get for having several threads open and answering in order! :)