-
Alexis822
I have created a query loop with grids. 5 customer cases per grid. The second grid has no image for the moment. But it creates a space. How to remove it when it is empty
-
Hi there,
Have you resolved the issue?
Just checked the linked page and don’t see any odd space.
Let me know 🙂
-
Alexis822
Check HTML after : “Cabinet d’expertise comptable et conseil pour les entreprises” please
“gb-grid-wrapper gb-grid-wrapper-ed3511d3 grid-portfolio”
-
Fernando
Hi Alexis,
Are you referring to having the same height for Grid columns? If so, you can check this Article out: https://docs.generateblocks.com/article/equal-height-grid-containers/
-
Alexis822
No, in fact below the 5 client cases, there is an empty space because I recreated a grid with query loops. But for the moment there is nothing. But it creates a gap. Look above the section “Trust us with your digital strategy!”
-
Fernando
To assure we’re seeing the same thing, can you share a screenshot of the issue from your end?
Uploading Screenshots: https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
-
Alexis822
I have another need also related to the query loop. Can we display a custom message when it is empty
-
Fernando
The space is coming from the padding set. Try moving the padding to the Post Template Block of the Query Loop instead.
Can you open a new topic regarding the other inquiry?
-
Alexis822
So there is no solution for this div not to appear as long as there is nothing in the query loop
-
Fernando
Try adding the padding to the Post Template Block and add this CSS:
.gb-grid-wrapper.grid-portfolio .gb-query-loop-wrapper:empty{ display:none; }
-
Alexis822
I still have the spacing
-
David
Hi there,
the spacing is coming from the grid item containers that each of your empty query loop items are inside of.
and theres no simple way to tell a container block to do something if the query item inside of it is empty.Question – why use a Grid Block with so many individual Query Loop blocks ?
-
Alexis822
Ok, The images are never the same size. Out of the 5 cases.
-
David
Can you use a single query Loop block to show ALL the posts, and then we can look at how to change the sizes.
-
Alexis822
To do in css ? I’ll tell you that I spent a lot more time on this project and I’m not finished yet. But for the next times I will do like this if it is recommended
-
David
If you wanted to show a layout like this for example:
Post 1 | Post 2 --- Post 3 --- Post 4 | Post 5 --- Post 6 --- Post 7 | Post 8
Then you can make a Query Loop, and set the Post Template -> Sizing -> Width to
50%
We can then use a couple of lines of CSS to make Post 3 and Post 6 100% Wide.
Is that what you need ?
- You must be logged in to reply to this topic.