Posts

Showing posts from June, 2025

PKsri_D_C1

Adding space between grid items with the grid-gap property One big benefit to using CSS grid is that you don’t need to use padding or margin to add space between grid items. You can use the grid-gap (or gap in newer browsers) to automatically add space in your grid template. We’ve set grid-gap to 20px, so the browser will know to add 20px of space between all items, whether they are side by side or stacked. And you may have noticed that all the CSS properties for grid were set on the parent .grid-container element. We didn’t actually have to write any CSS for the child .grid-child elements!

PSRI_D_I

Adding space between grid items with the grid-gap property One big benefit to using CSS grid is that you don’t need to use padding or margin to add space between grid items. You can use the grid-gap (or gap in newer browsers) to automatically add space in your grid template. We’ve set grid-gap to 20px, so the browser will know to add 20px of space between all items, whether they are side by side or stacked. And you may have noticed that all the CSS properties for grid were set on the parent .grid-container element. We didn’t actually have to write any CSS for the child .grid-child elements!

PSRI_M_I

Adding space between grid items with the grid-gap property One big benefit to using CSS grid is that you don’t need to use padding or margin to add space between grid items. You can use the grid-gap (or gap in newer browsers) to automatically add space in your grid template. We’ve set grid-gap to 20px, so the browser will know to add 20px of space between all items, whether they are side by side or stacked. And you may have noticed that all the CSS properties for grid were set on the parent .grid-container element. We didn’t actually have to write any CSS for the child .grid-child elements!

PKsri_M_C

Adding space between grid items with the grid-gap property One big benefit to using CSS grid is that you don’t need to use padding or margin to add space between grid items. You can use the grid-gap (or gap in newer browsers) to automatically add space in your grid template. We’ve set grid-gap to 20px, so the browser will know to add 20px of space between all items, whether they are side by side or stacked. And you may have noticed that all the CSS properties for grid were set on the parent .grid-container element. We didn’t actually have to write any CSS for the child .grid-child elements!