PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, June 30, 2022

[FIXED] How to avoid / remove blank space in .row

 June 30, 2022     css, javascript, prestashop     No comments   

Issue

It is my first time using Prestashop, I have a strange problem where items do not flow in the correct order. There some white space in the second/third rows usually.

Please have a look on the website for example: https://lascelta.eu/13-vitello

Each product is a div with the class="item col-xs-12 col-sm-6 col-md-4" in the .row div, however, this problem still appears.

Empty space


Solution

First 2 div height are 413px.
The third is only 411px.
So you need to clear: both; each 3 items on md size, each 2 on sm :

@media (min-width: 992px) {
    .item:nth-child(3n + 1) {
        clear: both;
    }
}
@media (min-width: 768px) and (max-width: 991.99px) {
    .item:nth-child(2n + 1) {
        clear: both;
    }
}


Answered By - Obzi
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing