Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Product Listing - Image width & height issue

Product Listing - Image width & height issue

Locked

Views: 1,320

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 Sep 2009, 3:56 PM
#1
kismetdesign avatar

kismetdesign

Zen Follower

Join Date:
May 2009
Location:
Junction City, Oregon
Posts:
315
Plugin Contributions:
0

Product Listing - Image width & height issue

Hi. I have a pre-defined width and height for the thumbnails I'm using on my product info pages. I thought all my thumbnails were going to be the same size, then later found out that only the height will be the same on all. The width could vary by 50 pixels or so.

Is there a way to change the settings to make sure that I will be able to use both sizes for the width and not have the image turn out distorted?

My work-around for the moment is just saving both images the same size, but using a background layer for the smaller one that picks up the background color of the page.

Any information would be helpful. Thanks! :smile:

PS. I'm using the latest version of ZenCart.

23 Sep 2009, 8:52 PM
#2
kismetdesign avatar

kismetdesign

Zen Follower

Join Date:
May 2009
Location:
Junction City, Oregon
Posts:
315
Plugin Contributions:
0

Re: Product Listing - Image width & height issue

Okay, I think I fixed it.

In the stylesheet, I found this line:

#productMainImage{width: 180px; margin:10px; text-align:left; line-height:20px}

and just pulled out the width, hoping it would default to auto.

So now I have this:

#productMainImage{margin:10px; text-align:left; line-height:20px}

It worked, and I checked it against 2 product pages using 2 different sized images.

Hoping that works as a permanent solution.

KD :smile: