CSS Grid Carrot Patch Unblocked

Play CSS Grid Carrot Patch online for free in your browser. No download, no sign-up.

CSS Grid Carrot Patch gameplay screenshot
  • Works on mobile
Report a problem

Turn your phone sideways for a bigger view of this game.

CSS Grid Carrot Patch is a coding puzzle that teaches CSS grid layout in a vegetable garden. The garden is a five-by-five grid of soil, and some squares hold carrots or weeds. You write real CSS that places a patch of water over the carrots or poison over the weeds. Because the garden is an actual grid container, the patch moves as you type, which makes line numbers and spans much easier to picture than in a textbook.

How to Play CSS Grid Carrot Patch

Each level gives a short lesson, a code box and the garden. Most of the stylesheet is already written, and you fill in the missing declarations. When the water or poison covers exactly the right squares, the Next button lights up. Press it and the treated plants switch to their finished look before the next level loads.

The 28 levels start with single properties. You place the water using grid-column-start and grid-column-end, learn that negative numbers count from the right edge, and use span to set a width instead of an end line. Then the grid-column and grid-row shorthands combine start and end, and grid-area sets all four lines at once. Some levels have two patches that overlap.

Next comes the order property, which rearranges items that are placed automatically. The last levels change the grid itself with grid-template-columns, grid-template-rows and the grid-template shorthand. Along the way you use percentages, pixels, ems, repeat() and fr units. Solving the final level shows a short win screen.

CSS Grid Carrot Patch Controls

Controls for CSS Grid Carrot Patch
ActionKeyboardMouseTouch
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—

Tips and Strategies

  • Count lines, not squares. A patch that covers columns 2 through 4 runs from line 2 to line 5, so write grid-column: 2 / 5.
  • Use span when the size is known. grid-column-end: span 3 covers three cells from wherever the patch starts.
  • Remember the grid-area order. The four values go row start, column start, row end, column end, which is not the same order as margins.
  • Let fr share leftover space. In 1fr 5fr, fixed columns are sized first and the rest is split one part to five.
  • Point at the property names. The highlighted words in each lesson show a list of the values they accept.

Features

  • Live garden preview: watch the water or poison move with every keystroke.
  • Gradual lessons: each level adds one property or unit.
  • Level menu: jump to any of the 28 levels, with solved ones marked.
  • Saved answers: your code for each level is remembered in the browser.

Tested and updated:

CSS Grid Carrot Patch Unblocked: FAQ

What counts as a correct answer?

The game applies your CSS to the garden, then checks that every carrot is covered by water and every weed by poison, with each patch the exact size and position of the plant. Any code that gets there works, even if it differs from the hint.

How are grid lines numbered?

Lines sit between the cells, so a five-column garden has six vertical lines, counted 1 to 6 from the left. Negative numbers count from the right, so -1 is the last line. Several early levels are built around this idea.

Do I lose my answers if I leave?

No. The game keeps your current level, your typed answers and the list of solved levels in your browser. The Reset link in the level menu wipes them if you want a fresh start.

Can I play on a tablet?

Yes. On narrow screens the garden and the editor stack in one column, and you type with the on-screen keyboard. The property tips appear when you point at them with a mouse, so they are easier to use on a computer.

More Free Games to Play Online