Help with products layout in grid view

Hello my webspage its showing the products display in grid layout not aligned… Check how it is http://www.pinkstrawberry.pt/fringe.html

I want it to be all aligned.

Can you tell me what am I skipping?

14 answers

Profile photo of Luís Algarvio 0.00 $tone July 16, 2013
Public

Sorry that didn’t solved my problem since I want it to look like grid.

The problem is the products are not all followed.. there is 3 lines and it look like this:

4 in first Line
1 in second line
3 in third Line

And i want it to be

4 in first line
4 in second line

#2
Profile photo of Marvin Fife 0.00 $tone July 24, 2013
Public

I do not have the site live at this point because of that layout issue and an issue with the JM_products module causing the mysql database to be fully utilized (I have ~60,000 products). I’ll see about cloning the VM and getting that to you in a little while.

#7
Profile photo of Sherlock 0.00 $tone August 26, 2013
Public

hi mate,

you can open the css file of skin/frontend/default/jm_lingerie/css/styles.css look for this css rule

HTML Code:

  .products-grid li.item {
  float: left;
  margin: 0 0 20px !important;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 33%;
  z-index: 1;
}

here you can try to set a height value for the rule, for example height:350px so change the above to

HTML Code:

  .products-grid li.item {
  float: left;
  margin: 0 0 20px !important;
  overflow: hidden;
  padding: 0;
  height:350px;
  position: relative;
  width: 33%;
  z-index: 1;
}

I hope it helps !

#10
Profile photo of Sherlock 0.00 $tone August 27, 2013
Public

Hi mate,

you can try with this css rule

HTML Code:

 .category-products .products-grid li.item {
  float: left;
  margin: 0 0 20px !important;
  overflow: hidden;
  padding: 0;
  height:350px;
  position: relative;
  width: 33%;
  z-index: 1;
}

I hope it helps !

#12
Profile photo of Marvin Fife 0.00 $tone November 18, 2013
Public

With those changes, it created an issue where the "Latest Products" on the left were also being set with a height of 350px. To remedy this, I edited /app/design/frontend/default/jm_lingerie/template/joomlart/jmproducts/list.phtml, line 26, to remove "item" from the class. This made it so the left hand items are closer together and the main items do not have issues flowing.

Change this line in /app/design/frontend/default/jm_lingerie/template/joomlart/jmproducts/list.phtml:
Code:

<li class="item <?php if ($j==$_rowCount) : echo "item-row-last"; endif; ?> <?php if(($i-1)%$config['perrow']==0): ?> first<?php elseif($i%$config['perrow']==0): ?> last<?php endif; ?>" <?php echo $width;?>>

Just remove "item"

Code:

<li class="<?php if ($j==$_rowCount) : echo "item-row-last"; endif; ?> <?php if(($i-1)%$config['perrow']==0): ?> first<?php elseif($i%$config['perrow']==0): ?> last<?php endif; ?>" <?php echo $width;?>>

With the CSS set to a fixed height and the phtml file edited to not include the "item" class, it works as expected.

Before:
Attachment 31477

CSS fix only (note the "Latest Products" on the left):
Attachment 31478

CSS and editing of column.phtml:
Attachment 31479

I’m just wondering if there will be issues down the road or if it is finally fixed…

#13

Please login or Register to Submit Answer

Written By

Comments