Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / I am trying to get 2 columns of categories on the index page.

I am trying to get 2 columns of categories on the index page.

Locked

Started by member on 6 Jul 2007, 2:26 AM · Views: 1,127

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
6 Jul 2007, 2:26 AM
#1
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #1 by member

I am trying to get 2 columns of categories on my homepage.
I can't find it in the admin, or trial and error with the files. I know this can't be that difficult.

I think I had the right admin option before but I can't find it again. I could get 3 columns, but if I chose 2 columns I only had 1 show up?

I did search, but I guess I am not using the correct terms.

Thanks for any advice.

6 Jul 2007, 6:13 AM
#2
Kim avatar

Kim

Obaa-san

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

Post #2 by Kim

Your URL so we can see what you are trying to do?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

10 Jul 2007, 10:30 PM
#3
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #3 by member

I don't have it online, it is on a local server. Is there a place in the admin to set this?

11 Jul 2007, 3:50 AM
#5
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #5 by member

Thanks for the location. If I put 4, I get 3. If I put 3, I get 3. If I put 2, I get 1?
Any idea why?

11 Jul 2007, 4:07 AM
#6
gjh42 avatar

gjh42

Black Belt

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

Post #6 by gjh42

That confirms what I suspected.
You are most likely getting a margin or padding error. The width allotted to each category display is calculated as 100% divided by the number per row, rounded down; 100/2 = 50%, 100/3 = 33%, 100/4 = 25%. Any margin or padding, or possibly border, applied to these increases this width say to 50.01%, 33.01% or 25.01%.

These add up to more than 100% in the case of 2 or 4, which won't fit in the allotted space, and the last one wraps to the next line.

To fix this, look in your stylesheet (/includes/templates/your_template/css/stylesheet.css) for .categoryListBoxContents or anything including that, and tell us what you see.

11 Jul 2007, 4:32 AM
#7
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #7 by member

Thanks for the info. I couldn't find the error, but will look at it better. It may be a few days because I have things I have to do. I will post something as soon as I can. Thanks again.

11 Jul 2007, 3:33 PM
#8
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #8 by member

Plans are going to get rained out, so I am back. I moved my custom stylesheet out of the folder all together and I still get one column when asking for two. If I remove the custom/css folder all together, it makes a mess but I get two columns when asking for two.

I have the css flyout header installed. Could this have something to do with it?

11 Jul 2007, 6:07 PM
#9
gjh42 avatar

gjh42

Black Belt

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

Post #9 by gjh42

Since we can't see your site, you need to install the Firefox Web Developer extension, and possibly Firebug too, so you can examine your output for all possible class/id tags that could be affecting the area. I'm not sure offhand whether padding on .centerColumn reduces the width available beyond the calculation, or if the calculation is applied after the padding is figured in - I think the latter.

Another thing you might do is to go through your stylesheet and one by one change all margin/padding properties to 0 for anything in or touching the center column. Most of those will be irrelevant, but you might find the culprit that way. Alternately, compare the /template_default/ stylesheet with your custom stylesheet in Winmerge to find the differences. Since you say spacing works in /template_default/ (odd blocky colors), the problem has to be with something that is changed or added.

11 Jul 2007, 11:31 PM
#10
member avatar

member

Zen Follower

Join Date:
Dec 2004
Posts:
102
Plugin Contributions:
0

Post #10 by member

Thanks for the Winmerge I had to change this in stylesheet.css:

#headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
margin: 0em;
padding: 1.25em;
}

to

#headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
margin: 0em;
padding: .5em;
}

Thank you gjh42 for all of the help.