concept

Grid gutters — CSS reference

The spaces specified by row-gap and column-gap take up room between adjacent grid tracks. During sizing they behave like fixed-size tracks; they are not separate addressable cells. Alignment can add extra spacing, and collapsed auto-fit tracks have special gap rules.

Formal Syntax & Structure

css syntaxcss
column-gap: 20px;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>grid-gutters</title><style>body{margin:0}#g{display:grid;width:300px;grid-template-columns:100px 1fr;grid-auto-rows:40px;justify-content:start;align-content:start;background:#e8edf1}#g>*{background:#126f70;color:white}#b{background:#325d8c}#g{grid-template-columns:100px 1fr;column-gap:20px}</style><body><div id="g"><div id="a">A</div><div id="b">B</div></div></body></html>
CSS Reference