Slenkhar
KPCKevin Powell - Community
•Created by Slenkhar on 12/29/2023 in #front-end
How to force parent grid to flow when nested grid content overflows
92 replies
KPCKevin Powell - Community
•Created by Slenkhar on 12/20/2023 in #front-end
How do I solve this background conundrum , I'm lost. Thank you for any help
I have a grid section that is 100vh
2 grid items inside, an H1 and a P.
I need these centered both vertically and horizontally inside, as they are currently (using place-items: center center;)
BUT I also need their background colors to be full height and width of their own grid cell, which is the case when place-items isn't used, but when I centre, the background shrinks to the size of the element.
How do I achieve this in a simple and non hacky manner, that is also responsive. I have found padding and margin to be unhelpful.
I've been stuck on this for 2 days now.
Thank you kindly for your help
https://codepen.io/Slenkhar/pen/xxBKzdB
10 replies