Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to Adjust sub-Category column width

How to Adjust sub-Category column width

Locked

Views: 2,705

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
27 Feb 2007, 2:46 AM
#1
bekahruth avatar

bekahruth

Zen Follower

Join Date:
Feb 2007
Posts:
101
Plugin Contributions:
0

How to Adjust sub-Category column width

Right now, on my categories index pages the column width for the sub-categories adjusts based on how many sub-categories there are. I want to set them all to a fixed 25%. As you can see in the links below, when I have four sub-categories, they go where I want them to, but when I have less than four sub-categories, the width increases to equal 100%, thus pushing them down below the image. BTW, this only happens in Firefox, not IE6.

http://tehome.net/shop/index.php?main_page=index&cPath=1

http://tehome.net/shop/index.php?main_page=index&cPath=2

27 Feb 2007, 3:37 AM
#2
bekahruth avatar

bekahruth

Zen Follower

Join Date:
Feb 2007
Posts:
101
Plugin Contributions:
0

Re: How to Adjust sub-Category column width

Okay, now I feel dumb, it was right in front of me. Sometimes you stare at the screen so long, you just can't comprehend what you're reading. For anyone who wants to know how I did it, the file to edit is: includes/modules/category_row.php.

I changed the following:
$col_width = floor(100/$num_categories);
} else {
$col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW)

to:
$col_width = floor(25);
} else {
$col_width = floor(25)

27 Feb 2007, 3:40 AM
#3
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: How to Adjust sub-Category column width

I came, I looked, and I saw everybody lined vertically so nice and pretty in both FF and IE7. Looks good.

27 Feb 2007, 3:59 AM
#4
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Location:
Minneapolis MN, USA
Posts:
128
Plugin Contributions:
0

Re: How to Adjust sub-Category column width

I hate to tell you this, but you also have a problem when it is viewed in Opera 9x -- the sub-category images are all on top of each other in the upper right.

I think the divs containing the sub-category images need a "clear: right;" added to them, at least that worked here and doesn't break anything in FF or IE as far as I could tell.

Becky :-)

28 Feb 2007, 7:52 AM
#5
bekahruth avatar

bekahruth

Zen Follower

Join Date:
Feb 2007
Posts:
101
Plugin Contributions:
0

Re: How to Adjust sub-Category column width

Thank you guys for checking out my site for me! Becky you just saved me so much time and headache as it would have taken me a long time to figure out how to fix the problem in Opera. Thanks a million...