Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
Last updated on : 2023-03-20
This allows you to create gaps/gutters between flex items and to control the space between items.
Inherited
no
Applies to
multi-column elements, flex containers, grid containers
Initial value
row-gap: normal column-gap: normal
Animation type
row-gap: a length, percentage or calc(); column-gap: a length, percentage or calc();
Computed value
row-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elements column-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elements
CSS Box Alignment Module Level 3 # gap-shorthand
/* One <length> value */
gap: 20px;
gap: 1em;
gap: 3vmin;
gap: 0.5cm;
/* One <percentage> value */
gap: 16%;
gap: 100%;
/* Two <length> values */
gap: 20px 10px;
gap: 1em 0.5em;
gap: 3vmin 2vmax;
gap: 0.5cm 2mm;
/* One or two <percentage> values */
gap: 16% 100%;
gap: 21px 82%;
/* calc() values */
gap: calc(10% + 20px);
gap: calc(20px + 10%) calc(10% - 5px);
/* Global values */
gap: inherit;
gap: initial;
gap: revert;
gap: unset;
index.html
Source:index.html
Browser Support For Safari on iOS Versions
Browser Support For Android Browser Versions
Browser Support For Chrome for Android Versions
Browser Support For Firefox for Android Versions
Browser Support For Samsung Internet Versions
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeTest your website on 3000+ real browsers and operating systems for mobile and desktop with the LambdaTest cloud. Perform browser compatibility test for gap property for Flexbox and many more web technologies that are a part of your website or web-application.
Last Modified date
2023-03-20
Data sourced from
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeHarness the power of Chromium-based engine to deliver responsive websites and web apps.
Try for freeGet 100 minutes of automation test minutes FREE!!