Grid Row Tracks
Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 28 of 55.
A grid with a 240-pixel height and grid-rows-3 divides its height into three 80-pixel tracks when there is no gap. Explicit rows describe track sizes, independently of column definitions.
<div class="grid h-60 grid-rows-3">Museum sample</div>The equal fractions need available height to share. If the container has no fixed or otherwise constrained height, content contributes to its height; do not assume each row will receive an arbitrary pixel size. The suffix is the row count, so grid-rows-6 requests six equal rows.
Challenge
MediumDivide the supplied 240-pixel schedule grid into five equal rows with no gap.
Keep the supplied content and element IDs. Edit the HTML utility classes or the requested CSS. Click Run preview to refresh the preview after edits, then use Check/Run code to grade your work.
Try it yourself
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Practice studio</title><link rel="stylesheet" href="./styles.css"></head><body>
<div id="target" class="grid h-60"><span>Morning</span><span>Noon</span><span>Evening</span></div>
</body></html>
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1Meet Tailwind
A Styled First RunChoosing UtilitiesCombining UtilitiesThe Local StylesheetRecap: Meet Tailwind