Archived topic
GB Grid
5 replies · Started by Brian on December 9, 2020
Hi
I am trying to setup four linked images using generateblocks grid. I am having a problem in that the top two images are not lining up properly. Also, I am finding that the grid doesn't seem to like staying within the content area compared to other pages. Could you please tell me what I am doing wrong?
Kind Regards,
Brian Thompson
Hi there,
first select the parent Grid Container and in its settings change the Vertical Alignment to Default see here:
https://docs.generateblocks.com/article/grid-overview/#editing-our-grid-block
Whilst you're there you can set the vertical and horizontal gap.
Then the last piece is this CSS you have here:
.inside-article img {
border-radius: 10px;
box-shadow: 0 0 3px 3px #DAD5D3;
margin: 10px;
}
The margin: 10px; property is causing the images to flow out of the grid containers. Are you require this spacing anywhere else in your site ?
Hi David,
Thanks for that, I reset the horizontal and vertical settings to default and it seems to be fixed. Thank you.
Also, I'm just wondering how do you apply that class just to specific pages and not to the whole site?
Kind Regards,
Brian Thompson
Hi Brian,
For example, if you only want this css apply to your ABOUT page, then add an additional class in front:
.page-id-2472 .inside-article img {
border-radius: 10px;
box-shadow: 0 0 3px 3px #DAD5D3;
margin: 10px;
}
If you want it apply to your HOME page, then use .home instead of .page-id-2472.
Let me know :)
Hi Ying,
Thanks for the help, it worked. I have it sorted. Also, thank you David, Much appreciated.
Kind Regards,
Brian Thompson
Awesome!
Glad to help :)