concept

Grid fixed track sizing — CSS reference

A definite length or resolvable percentage provides a fixed sizing function. A plain fixed track has the same minimum and maximum. It need not expand to absorb free space; a grid can retain unused space. Percentages use the relevant grid container dimension.

Formal Syntax & Structure

css syntaxcss
grid-template-columns: 80px 50%;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>grid-fixed-track-sizing</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:80px 50%}</style><body><div id="g"><div id="a">A</div><div id="b">B</div></div></body></html>
CSS Reference