grid-auto-rows

W3C CSS Snapshot 2026

Size rows the browser creates outside the explicit row list.

On this page

Syntax and values

Value or syntaxWhat it does
autoThe initial size for implicit rows.
120px / 25%Sets a fixed length or a percentage of the relevant container size. A percentage can behave like auto when the size depends on its tracks.
1fr / 2frUses a fraction of the available space. A track with 2fr takes a twice-as-large share as 1fr when neither is limited by its minimum.
auto / min-content / max-contentSizes the track from its items. min-content uses their minimum intrinsic contribution and max-content uses their maximum intrinsic contribution.
minmax(80px, 1fr)Keeps the track at least 80px wide or tall and lets it share the remaining space.
fit-content(180px)Uses the content size with an upper limit of 180px when the automatic minimum allows it.

Try the example

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>grid-auto-rows example</title>
  <style>
.layout { display: grid; width: min(100%, 320px); border: 2px solid teal; box-sizing: border-box; }
.layout > div { padding: 8px 12px; background: #def5f5; color: #123; border: 1px solid #81b9b5; box-sizing: border-box; }
.layout { grid-template-columns: 1fr 1fr; grid-template-rows: 42px; grid-auto-rows: 80px; }
  </style>
</head>
<body>
<div class="layout">
  <div class="first">A</div>
  <div class="second">B</div>
  <div>C</div>
</div>
</body>
</html>

What to expect C creates a second row that is 80px tall.

Official references