Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to make fixed row height in product listing?

How to make fixed row height in product listing?

Locked

Views: 4,097

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
27 Nov 2007, 7:13 AM
#1
chapagain avatar

chapagain

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

How to make fixed row height in product listing?

I have 'new products' listing in my index page of zen-cart. I have used column grid layout. My layout is 3 columns per row. I have made the height of product image to be fixed to 80px. I also don't have any problem with the width of the product as it is same for all the products.

But, still i have problem in product display. I have long names for some of the products. The products with long name are taking more space, hence pushing the other products below and making the display improper.

I think if I could make a constant height for each row, then the problem will be solved. But, I don't have any idea, how to do so...

Any help???

27 Nov 2007, 10:34 AM
#2
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: How to make fixed row height in product listing?

My guess would be to set the width rather than the height. Add the width element to the whatsnewContent style and set it to the same width as your images.

Also, any chance of a URL???

27 Nov 2007, 11:01 AM
#3
chapagain avatar

chapagain

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Re: How to make fixed row height in product listing?

I don't have any problem with assigning fixed width to the image.. infact, my images are all of fixed width.. i have the problem with height..

well, i tried a trick to assign some height property to the css class "centerBoxContentsNew".. i assigned height:120px to the class "centerBoxContentsNew" in the stylesheet.. but this is not the proper solution.. it will leave whitespace in between the rows..

any efficient idea ???

27 Nov 2007, 3:39 PM
#4
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: How to make fixed row height in product listing?

Have you tried setting line-height???

28 Nov 2007, 12:05 PM
#5
chapagain avatar

chapagain

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Re: How to make fixed row height in product listing?

well, i think that i found the solution..

you need to edit in your includes/templates/YOUR_TEMPLATE/common/tpl_columnar_display.php file...

Note/PS: I have column grid layout module installed...

/* 'clear:both' in stylesheet did the trick */

.clearBoth{
     clear: both; 
}

the change in tpl_columnar_display.php is as under:

if($col == (sizeof($list_box_contents[$row]) - 1))
{
     echo "<br class=\"clearBoth\" />";
}

the above code was added just below this one:

echo '<div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</div>' . "\n";

feeling lazy to describe all this :wacko:

hope everyone will understand this.. if not, then you can implement this and try to understand.. even if you don't understand.. then please reply to this post.. :cool:

15 Jan 2009, 3:44 AM
#6
acreativepage avatar

acreativepage

Zen Follower

Join Date:
Sep 2004
Posts:
146
Plugin Contributions:
0

Re: How to make fixed row height in product listing?

thank you!!!