Kevin Powell - CommunityKP-C
Kevin Powell - Communityโ€ข9mo agoโ€ข
17 replies
Faker

Why setting display grid without using grid template columns/rows creates new row with space

Hello, I have a quick question. Consider the following codepen. I have set display of grid on my body element and center the items. When I add 2 element inside my grid container, it seemas that the body is divided equally for these 2 elements.

My question is why is that so? What is happening here? Like I didn't set any padding nor any gap and the elements appears like that. What creates the space?

https://codepen.io/Fakeur/pen/ByyMeMa
E6AB875C-6259-4C94-A6F1-B3FAB87080FE.png
CodePenFakeur
...
Untitled
Was this page helpful?