Forums / Templates, Stylesheets, Page Layout / Change <div class="categoryListBoxContents" style="width:33%;">

Change <div class="categoryListBoxContents" style="width:33%;">

Locked

Views: 10,338

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Apr 2007, 4:18 AM
#1
akabigdog avatar

akabigdog

New Zenner

Join Date:
Apr 2007
Posts:
6
Plugin Contributions:
0

Change <div class="categoryListBoxContents" style="width:33%;">

Where do I change style width? I want 4 images to show up on a row. Tried changing number using Configuration/Index Listing, but all images still are set to 33% using style.

Thanks for the help.

Bill

20 Apr 2007, 5:14 AM
#2
Kim avatar

Kim

Obaa-san

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

Re: Change <div class="categoryListBoxContents" style="width:33%;">

What template are you using? What version of Zen Cart?

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.

20 Apr 2007, 12:50 PM
#3
akabigdog avatar

akabigdog

New Zenner

Join Date:
Apr 2007
Posts:
6
Plugin Contributions:
0

Re: Change <div class="categoryListBoxContents" style="width:33%;">

Set-up is for v1.3.7

Working on updating an old template to an upgraded new template using old files. New stylesheet is based on default tpl provided with v1.3.7.

Regards, Bill

20 Apr 2007, 1:11 PM
#4
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

Re: Change <div class="categoryListBoxContents" style="width:33%;">

\includes\modules\category_row.php
line 39.

20 Apr 2007, 2:28 PM
#5
tmc_sherpa avatar

tmc_sherpa

Zen Follower

Join Date:
Mar 2007
Posts:
158
Plugin Contributions:
0

Re: Change <div class="categoryListBoxContents" style="width:33%;">

it may be easier than that. I' m on the wrong machine to check right now, but the items per row can be set in admin. Just remember there is an items per row for just about everything, so you would need to change it for products/featured products/new products/etc

Lazy and willing to work very hard to stay that way

20 Apr 2007, 4:20 PM
#6
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Change <div class="categoryListBoxContents" style="width:33%;">

First you adjust the categories per row, in the admin. Go to "Configuration", "maximum values", then for "Categories To List Per Row"

However, I prefer having some padding between the categories, so I adjust the 33% like this:

On line 25 and 27 of the same file, I do this:

$col_width = floor(100/$num_categories) - 2;

$col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW) - 2;

That would cause the width to be 31%, of course you could do whatever number you'd like.

There are other places where you may need to do the same thing, if you want the products to also be spaced like this, like:

modules/product_listing.php
modules/new_products.php
modules/also_purchased_products.php
modules/featured_products.php

21 Apr 2007, 1:03 AM
#7
akabigdog avatar

akabigdog

New Zenner

Join Date:
Apr 2007
Posts:
6
Plugin Contributions:
0

Re: Change <div class="categoryListBoxContents" style="width:33%;">

Thanks a bunch. Solutions were very helpful.

;-)