Skip to content
KBHXgamesAll games

Play CSS Grid Carrot Patch Online

Write real CSS grid rules to water carrots and poison weeds on a 5x5 garden across 28 short levels.

CSS Grid Carrot Patch gameplay screenshot
  • Touch-ready

Tip: rotate your phone to landscape for a larger screen.

CSS Grid Carrot Patch at a glance

Genre
Puzzle Games
Play with
Keyboard, Mouse, Touch screen
On phones
Yes, touch works
Players
1 player
Price
Free, no sign-up
License
MIT

CSS Grid Carrot Patch is a coding puzzle that teaches CSS grid layout using a small vegetable plot. The garden is a five-by-five grid, and some squares hold carrots or weeds. You write real CSS to place a patch of water over carrots or poison over weeds. Since the garden is a live grid container, the patch shifts as you type, which makes grid lines easy to picture.

The Goal

Cover the right plants with the right treatment on every level. Water must land exactly on the carrots and poison exactly on the weeds, matching their size and position. When the patch fits, the Next button lights up and the plants change to show they are done.

How a Round Plays Out

Each of the 28 levels shows a lesson, a code box and the garden. Most of the stylesheet is already there, and you fill in the missing lines. Any correct code counts, even if it differs from the hint.

  1. Early levels use grid-column-start and grid-column-end to place the water.
  2. Next you learn negative line numbers and the span keyword.
  3. The grid-column and grid-row shorthands then combine start and end.
  4. Grid-area sets all four lines at once, and some levels have two overlapping patches.
  5. The order property rearranges items placed automatically.
  6. The final levels change the grid itself with grid-template-columns, grid-template-rows and grid-template, using percentages, pixels, repeat and fr units.

Keys and Buttons for CSS Grid Carrot Patch

Keyboard, mouse and touch controls for CSS Grid Carrot Patch
What you do⌨ Keyboard🖱 Mouse👆 Touch
Type CSSType in the code box—Tap the code box and use the on-screen keyboard
Submit a correct answerEnter on the last line, or Ctrl + EnterClick "Next" once it lights upTap "Next"
Pick a level—Click the level counter, then a level number, or use the side arrowsTap the level counter, then a level number
Read about a property—Point at a highlighted property name in the instructions—

Winning Strategies

  • Count lines, not cells. Covering columns 2 through 4 means running from line 2 to line 5.
  • Reach for span when you know the width. Span 3 covers three cells from wherever the patch begins.
  • Learn the grid-area order. It goes row start, column start, row end, column end, which is not the margin order.
  • Let fr split the rest. Fixed sizes come first, then fr units share whatever space is left.
  • Point at highlighted words. Property names in the lesson show the values they accept.

Handy Details

  • On narrow screens the garden and editor stack, so tablets work, but property tips are easiest with a mouse.
  • You can pick any level from the level counter menu.
  • Ctrl and Enter submits a correct answer from the keyboard.

Who Should Play It

This is a great fit for students, junior developers and designers who want to understand CSS grid without reading a long spec. If you enjoy coding puzzles or hands-on layout tutorials, the garden makes each property feel concrete.

Played and checked by the KBHX Games team · updated

CSS Grid Carrot Patch: Questions and Answers

Is CSS Grid Carrot Patch free, and is it good for beginners?

Yes on both counts. It runs free in your browser, and each level gives a short lesson before you write anything. Basic knowledge of what CSS is helps, but the game walks you through every grid property it uses.

Why does my patch stop one square short?

Grid lines sit between cells, not on them. A patch over columns 2 to 4 must end on line 5. In a five-column garden there are six vertical lines, and negative numbers count backward from the right edge.

Are my answers saved between visits?

Yes. Your current level, the code you typed and the list of solved levels are kept in your browser. Use the Reset link in the level menu if you want to clear everything and start over.

If You Liked CSS Grid Carrot Patch, Try These