- This topic has 9 replies, 4 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
April 5, 2023 at 12:01 pm #2598506
Stefanie
Hi there,
for the blog i have created a loop-template.
The cards should show the featured image and underneath the title and excerpt.Because i need a fallback image, i did not choose a GB-image for the featured image, but a GB-Container with background image.
The problem now is that i want to align the buttons in the query-loop at the bottom.
For this to work, I have to change the surrounding container to flex.But as soon as I do that, the background image of the image container disappears.
This is the query-loop with setting set to “Standard”
All the Containers with bg-images are displayed.This is the query-loop with setting set to “Flex”
The Buttons are aligned correctly, but all the bg-images are gone.April 5, 2023 at 12:14 pm #2598523Leo
StaffCustomer SupportHi there,
I don’t believe you need to change the display setting for the container.
Can you follow the instruction here to create equal height grid containers?
Then add
autoto the top margin of the button that links to the single posts:
https://docs.generateblocks.com/article/spacing-options-overview/#marginLet me know 🙂
April 5, 2023 at 1:42 pm #2598603Stefanie
Hi Leo,
thank you very much for the quick response!
Can you follow the instruction here to create euqla height grid containers?
I suppose you have forgotten to set the link to the instruction…
What I learned is this (in order to align buttons in a grid):
1. Set the Grid-Container to Flex
2. Make sure, that the height of the Container is 100%
3. Set the margin-top of the Button to autobut perhaps there are many ways
April 5, 2023 at 2:51 pm #2598680Leo
StaffCustomer SupportI suppose you have forgotten to set the link to the instruction…
My bad haha:
https://docs.generateblocks.com/article/equal-height-grid-containers/What I learned is this (in order to align buttons in a grid):
1. Set the Grid-Container to Flex
2. Make sure, that the height of the Container is 100%
3. Set the margin-top of the Button to autoThat is exactly what you have to do. Good job!
April 6, 2023 at 12:21 am #2599015Stefanie
Hi Leo,
That is exactly what you have to do.
But that is exactly what triggers the problem, as I have already described above.
I want to align the buttons all to one line (bottom).As I described above, this is how I do it:
For this to work, I have to change the surrounding container to flex.
But exactly at that moment my containers with the background images disappear.This is the display: standard:
https://prnt.sc/8yziMSlpZEhI
All the Containers with bg-images are displayed, but the buttons are not aligned.This is display: flex
https://prnt.sc/HU19_MIiAnaP
All the buttons are aligned, but now the images are gone!What to do?
April 6, 2023 at 12:29 am #2599024Fernando Customer Support
Hi Stefanie,
Try giving the Container Block that holds the image a min-height or height value.
Let us know how it goes.
April 6, 2023 at 1:39 am #2599119Stefanie
Hi Fernando,
unfortunately i can’t do that, because i need the images in a very specific aspect ratio.
So i gave the image container a css class:
ScreenshotThe images get their size through this css:
.aspect-ratio-16-10 { aspect-ratio: 16/10; }in such a case, is it not possible to align the buttons at the bottom?
April 6, 2023 at 4:35 am #2599315David
StaffCustomer SupportHi there,
1. Select your container block with the background image, and give it a width of
100%.
This will ensure it does not collapse on the next step.2. now select the Post Template container, and in Layout set the Display to
Flex, Flex Direction toColumnAll the other things you did should now work.
April 6, 2023 at 8:08 am #2599725Stefanie
Hi David,
All the other things you did should now work.
YES, now it works 🙂
Thank you!!
April 7, 2023 at 3:33 am #2600703David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.