- This topic has 22 replies, 4 voices, and was last updated 3 years, 3 months ago by
Nicolas.
-
AuthorPosts
-
January 6, 2023 at 4:58 pm #2486483
Ying
StaffCustomer SupportTry adding this CSS:
.gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container > .gb-inside-container >a >img,.gb-grid-wrapper.cu-grid-align >.gb-grid-column >.gb-container> .gb-inside-container >a { height: 100%; } .gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container> .gb-inside-container >a >img { object-fit: contain; }January 7, 2023 at 3:57 am #2486792Nicolas
I did and I see no change.
(And I cleared my cache).January 7, 2023 at 8:01 am #2487124David
StaffCustomer SupportYou can try this CSS:
.gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container > a { margin-top: auto; }But when you have variable size images and content, there is no method to make that layout magically work.
January 7, 2023 at 9:24 am #2487188Nicolas
It worked.
As of today, my CSS looks like this:
/* To align items of a grid vertically*/ .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container { height: 100%; display: flex; flex-direction: column; } .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container > p:last-of-type { margin-top: auto; } .gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container > .gb-inside-container >a >img,.gb-grid-wrapper.cu-grid-align >.gb-grid-column >.gb-container> .gb-inside-container >a { height: 100%; } .gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container> .gb-inside-container >a >img { object-fit: contain; } .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container > a { margin-top: auto; }What can I delete?
In his message above (29 Dec), Fernando had said the following:
Alternatively, if you can wait a little bit, we’re releasing an Alpha version of GenerateBlocks 1.7.0 in January, hopefully, by the first week.
January 8, 2023 at 4:37 am #2487727David
StaffCustomer SupportYou can combine two of the rules so you have this:
/* To align items of a grid vertically*/ .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container { height: 100%; display: flex; flex-direction: column; } .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container > a, .gb-grid-wrapper.cu-grid-align > .gb-grid-column > .gb-container > .gb-inside-container > p:last-of-type { margin-top: auto; } .gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container > .gb-inside-container >a >img,.gb-grid-wrapper.cu-grid-align >.gb-grid-column >.gb-container> .gb-inside-container >a { height: 100%; } .gb-grid-wrapper.cu-grid-align >.gb-grid-column > .gb-container> .gb-inside-container >a >img { object-fit: contain; }1.7 we’re still doing the final rounds of pre-alpha (live) testing
January 8, 2023 at 4:57 am #2487750Nicolas
I have the same issue on this page.
See URL in PI field info.Since I’m not a coder, I am very confused every time I encounter such a situation, that is, almost on every page I design.
I’m so strongly looking forward to your update on 1.7.January 8, 2023 at 9:59 am #2488079David
StaffCustomer SupportThe simplest fix is to add the HTML link and image inside its own Container Block, and then set the Container Blocks Minimum Height. Then you can manually adjust this in the editor for all the various designs.
January 8, 2023 at 11:29 am #2488138Nicolas
IS this what you mean?
1. I had to test 50 px for the minimal height of the container. Then 120. Then 150, etc. Till finding what seems to aligned the buttons with the other column. Is this normal to have such an approach?
2. I also had to change the vertical alignment of the custom html to get the image at the center of the container.
3. Will this approach not create layout issues on smartphone and ipad? Or others?
4. When do you think you are going to release a more elegant, wisiwig solution to such recurrent layout design issue with GB?
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.