Forums / Setting Up Categories, Products, Attributes / Spacing and alignment of products in columns

Spacing and alignment of products in columns

Locked

Views: 2,197

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
18 Nov 2007, 12:45 AM
#1
dman76 avatar

dman76

Zen Follower

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

Spacing and alignment of products in columns

I downloaded the mod to be able to list products in columns instead of just rows and it appears to work except I think I need some spacing or something to make these easier to read. You can check it out here as I am in the process of making this site but here is what it looks like:

http://www.pagebypaigescrapbooks.com/index.php?main_page=index&cPath=2_11

The products that take up more room than others come close to the one below it (like the first two columns here) and I think it is too close to the add to cart button. How can I either put more space in between them or align them so that all the add to cart buttons are in a straight line? Let me know what you think would look best.

On a side note, how do I get the additional images either closer together, left aligned, or something as long as they are all in a straight line and not like this:

http://www.pagebypaigescrapbooks.com/index.php?main_page=product_info&cPath=2_11&products_id=5

Thank you in advance

18 Nov 2007, 12:59 AM
#2
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Spacing and alignment of products in columns

installing the Image Handler2 mod will allow you to pad-out your images so the rows and cols are nice and neat.

18 Nov 2007, 1:31 AM
#3
dman76 avatar

dman76

Zen Follower

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

Re: Spacing and alignment of products in columns

I did install that and while it worked for uploading, they did not show up unless I uninstalled it. I searched the posts and found the same problem and the only solution I found for it was to upload images with it, then uninstall it everytime when you are done. Is that the only way?

By the way, I assume this response is to my second question, right?

18 Nov 2007, 1:42 AM
#4
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Spacing and alignment of products in columns

I was talking about the first question.

Things are out of line because the images are different heights. Not exactly sure about your previous problem with IH2, but it does have a setting to force the images to a consistant height without distorting them. That will fix that problem.

18 Nov 2007, 1:50 AM
#5
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Spacing and alignment of products in columns

Try adding below to bottom of your stylesheet to fix second problem.

#productAdditionalImages{clear:both;}

18 Nov 2007, 2:32 AM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Spacing and alignment of products in columns

These added to your stylesheet will start you on the path for the listing grid:

.centerBoxContentsProducts {
    height: 200px; 
    border-bottom: 1px solid #bbbbbb; 
    margin-bottom: 1em; 
    position: relative;
    }

.centerBoxContentsProducts br+a {/* an "a" following a "br" at same level */
    margin-left: -2.1em; /*adjust to half of element width*/
    position: absolute; 
    bottom: 1em; 
    left:50%;
    }

You will have to make the listings a fixed height (more than any possible content height) for this to work. With uniform kinds of content, this should be practical.

18 Nov 2007, 9:28 AM
#7
dman76 avatar

dman76

Zen Follower

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

Re: Spacing and alignment of products in columns

Thank you so much. I like having that line there, that makes a nice separation. I will try to mess around with it a little more. So I guess the key is the make the images all the same height? Even if I did that though, it still would be lower if the title is long enough that it takes up two lines of text. Maybe I'll give Image Handler another try to see if I can get those images all the same size.

19 Nov 2007, 5:51 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Spacing and alignment of products in columns

Actually, the code I posted makes the overall product a fixed height, so you don't need to worry about making the images fixed. If there was no chance of the titles being too long and wrapping, I would suggest to get the formatting with a fixed image height.

19 Nov 2007, 8:43 PM
#9
dman76 avatar

dman76

Zen Follower

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

Re: Spacing and alignment of products in columns

gjh42:

If there was no chance of the titles being too long and wrapping, I would suggest to get the formatting with a fixed image height.

I'm not exactly sure what you mean by this.

So I notice that while they are a fixed height, they are aligned at the top. Since some will have images that are wider than they are high, and may have more text than others, do you think it would look better if they were all bottom aligned (so all the add to cart buttons line up) rather than that top? Is there a way to do that?

20 Nov 2007, 8:40 AM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: Spacing and alignment of products in columns

It can be done; it involves adding a bunch of tags in the code in product_listing.php so they can be affected by the stylesheet. I have gone over this in a couple of threads in the past day. I'm tired and don't feel like looking them up right now...

20 Nov 2007, 9:56 PM
#11
dman76 avatar

dman76

Zen Follower

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

Re: Spacing and alignment of products in columns

Ok thank you, I will try to search for it.