The gap property of CSS is used to set the spacing also caller gutter between the rows and columns. As like column-gap and row-gap using separately both so that one can use simply gap property that can given column as well as row gap.
gap: <row-gap> <column-gap>
- <length>: The spacing is given in terms of length unit i.e. rm, px etc. For example: gap: 10px 20px
- <percentage>: The spacing is given in terms of percentage unit. For example: gap: 50%
Example 1: In this example, spacing is set in terms of length.
Example: In this example, spacing is set in terms of percentage.
- CSS | column-gap Property
- CSS | grid-row-gap Property
- CSS | grid-column-gap Property
- CSS | grid-gap Property
- How to Set the Gap Between Text and Underlining using CSS ?
- How to Specify Divider gap in Square Grid using Bootstrap ?
- CSS | transition-property Property
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | table-layout Property
- CSS | text-align Property
- CSS | border-top-width Property
- CSS | isolation Property
- CSS | border-inline-start-style Property
- CSS | column-rule-width Property
- CSS | word-spacing Property
- CSS | animation-delay Property
- CSS | margin-top Property
- CSS | border radius property
- CSS | grid Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.