Magento 1.9.2.4 Category Layout problem [closed]
-
08-10-2020 - |
Question
I have a problem with my category layout. Sometimes there is a gap between products list, just like a product is missed.
Any ideas how to solve this riddle?
Thank you.
La solution
CSS solution
This is related to the product heights, the quickest fix is to set a height on the product listing's .item
(unless you've altered the classes).
For example:
.products-grid .item {
height: 200px;
}
Keep in mind you may need to set the height to be different across different breakpoints.
I've just checked the site you're referring to and the fix is to change the min-height
to something like 550px
.
JS solution
For a more in depth solution you could use javascript, along the lines of getting the tallest .item
and setting the other's to be the same height. Even better you could do this per row of products. There are plugins for this such as http://brm.io/jquery-match-height/
Autres conseils
Just change css from
.products-grid .item
{
min-height : 496px
}
to
.products-grid .item
{
min-height : 540px
}
Your issue is solve.