freeCodeCamp/guide/english/certifications/responsive-web-design/css-grid/add-gaps-faster-with-grid-gap/index.md

618 B

title
Add Gaps Faster with grid-gap

Add Gaps Faster with grid-gap

In this challenge you are required to use "grid-gap" to define a row gap and a column gap.

Hint

You can define the gap for the row and column by declaring the following in the .container CSS codeblock:

grid-gap: 'row-gap' 'column-gap';

and inserting the desired parameters for 'row-gap' and 'column-gap'.

Solution

Since the challenge requires you to create a 10px gap between the rows and a 20px gap between the columns, add the following code to the .container CSS codeblock:

grid-gap: 10px 20px;