Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Product images - number per row in grid layout

Product images - number per row in grid layout

Locked

Views: 2,297

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Oct 2006, 8:38 PM
#1
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Product images - number per row in grid layout

I'm not really sure whether this is a css or a coding problem...

Using the Grid/Columns Layout for displaying product listing, I've set it to 3 per row. I've also used css to apply a drop shadow to the images. All works well, unless there are only 2 products to display and then I get a very broken layout...

How it should look

With only 2 products in a category

Any ideas on how to fix this please (apart from fixing $col_width in modules/product_listing.php to always generate 3 columns - I'd like to retain the flexibility of centering whatever is in the row)?

11 Oct 2006, 9:07 PM
#2
barco57 avatar

barco57

Totally Zenned

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

Re: Product images - number per row in grid layout

wow so many stylesheets so little time......:D

Well The drop shadow appears to stay attached to the right side of the div, so when the div expands.......
Might adding another div wrapping the image...that stays a fixed width.....

instead of:

<div1>
      <img>
</div1>

Maybe:

<div1>
    <div2>
          <img>
    </div2>
</div1>

with this div1 can expand or contract without affecting div2 which is set @ a fixed width to accomodate the image

Am I even close with this thought or should I dive back into the books some more?

11 Oct 2006, 9:19 PM
#3
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Product images - number per row in grid layout

barco57:

wow so many stylesheets so little time......:D

I'm in transition - I was trying out an idea someone else was working on, but I found it too time consuming when trying to locate things, so I'm gradually converting the "included" stylesheets back to a single file (more or less). However, I still need the others there until I've got it whittled down to what I really need.

The main one is presently named stylesheet_rick

I tried your method first, but changed it after having had problems...which on reflection could well have been unrelated! I'll take another look at your way. Thanks.

11 Oct 2006, 9:27 PM
#4
barco57 avatar

barco57

Totally Zenned

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

Re: Product images - number per row in grid layout

I have played with the css dropshadow before (not with zc) and it always had the double divs. Thats the way I've seen it with straight html pages. I just haven't taken the time to determine where to insert the extra div and class in the zc templates.