Forums / Templates, Stylesheets, Page Layout / Display Sub categorys as a grid, not list.

Display Sub categorys as a grid, not list.

Locked

Views: 1,334

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
4 Feb 2008, 7:14 PM
#1
rammer avatar

rammer

New Zenner

Join Date:
Oct 2006
Posts:
31
Plugin Contributions:
0

Display Sub categorys as a grid, not list.

Hi all,

I would like to know if I can get my sub categorys to be displayed in a grid, much like the grid mod does for products.

Here is a link to an example page: http://www.aspirehandbags.com/index.php/Essentials-c-8

There are only a couple of sub categories here at the moment, but you should be able to see what I am on about.

Many thanks for any assistance

4 Feb 2008, 8:46 PM
#3
rammer avatar

rammer

New Zenner

Join Date:
Oct 2006
Posts:
31
Plugin Contributions:
0

Re: Display Sub categorys as a grid, not list.

Hi,

thanks for your reply. I have tried that but it doesn't seem to help.

the only changed that occured, is that if i set that value to 1, the catagories appear in the centre of the screen.

Any other number, and it still shows just one per row. (it is currently set to 4)

I tried making the sub category image sizes smaller, in case they simply wouldn't fit. This didn't help either.

Any thoughts?

4 Feb 2008, 8:57 PM
#4
kobra avatar

kobra

Black Belt

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

Re: Display Sub categorys as a grid, not list.

Try changing this to left & or seperate out logo into it's own & maybe use text-align: center over float

#logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
	float: center;
}

Zen-Venom Get Bitten

4 Feb 2008, 9:14 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Display Sub categorys as a grid, not list.

That's strange.
Zen Cart automatically calculates how wide each of those category listings should be; in your case, since there are only two to display, it gives each 50%.

Margins or padding will add to that, and can make the correct number not fit, and browser rounding errors can make the total come to infinitesimally more than 100% which will bump the last one in line down, but I tested your site and neither of those is the problem.

Your stylesheet has

#logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {

float: center;

}

which is a problem. There is no such thing as "float: center;", and the original float: left; is what makes them line up in rows.
If you want other elements in that list to be centered, separate the selectors and restyle like this```
.categoryListBoxContents {
float: left;
}

#logo, .centerBoxContents, .specialsListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
text-align: center;
}


Nevermind, Kobra answered while I was looking at your site...
4 Feb 2008, 9:23 PM
#6
rammer avatar

rammer

New Zenner

Join Date:
Oct 2006
Posts:
31
Plugin Contributions:
0

Re: Display Sub categorys as a grid, not list.

Thank you both,

I'll try that now, back in a mo to confirm it has worked...

4 Feb 2008, 9:31 PM
#7
rammer avatar

rammer

New Zenner

Join Date:
Oct 2006
Posts:
31
Plugin Contributions:
0

Re: Display Sub categorys as a grid, not list.

That's worked a treat, thank you both very much.