💪 Train your CSS skills with online games 👾
Tags: design, productivity, webdev, layout
Published: 2019-11-15 13:31:02

As frontend developers we are often called to design a neat and appealing UI for our web app.

Nowadays there are plenty of concepts and technologies to be aware of: SCSS, responsive design, Grid Layout and Flexbox, just to cite some. Even when we use them daily at work, we typically remember only the most common rules.

Therefore why not practicing these concepts while playing and making the learning process fun?

![fungames](https://media.giphy.com/media/H3rmzuXUzcaOI/giphy.gif)

There are several online games that allows us to train our design skills and keep them up to date in an entertaining way. Let's have a look at some of them together.

---------------------------------------

# Basic CSS
&nbsp;

###CSS Diner

![CSS Diner](https://thepracticaldev.s3.amazonaws.com/i/g4uqsw53kmtdtudck5i8.png)

The goal is to use CSS statements to select specific UI elements on the screen. If the entered rules are correct, we can pass to the following level. There are 32 levels in total.
**Free** [Let's play](https://flukeout.github.io/)
&nbsp;


### CSS Grid Garden

![cssgridgarden](https://thepracticaldev.s3.amazonaws.com/i/gwld8qlkvtymvpav45qe.png)

In this game, we must water carrot crops by mastering CSS grid. To reach our goal we need to define columns, rows, and grid template areas.
**Free** [Let's play](https://cssgridgarden.com/)
&nbsp;


### Gridcritters

![gridcritters](https://thepracticaldev.s3.amazonaws.com/i/jostmz0vky409rva4sf1.png)

This game is a little design masterpiece. 
We need to use our CSS Grid skills to save alien critters from extinction! At each level more challenging requirements must be fulfilled  to succeed and proceed to the following stage.

The game has been developed by Dave Geddes, ex IT architect, now fully converted into educational platforms developer. You can read [here](https://gedd.ski/post/new-grid-site/) the story behind the project and also the CSS Grid rules used for the game home page. The blog post is already very informative by itself!
**Cost: 179$** [Let's play](https://www.gridcritters.com/)
&nbsp;


### CSS Battle

![CSSBattle](https://thepracticaldev.s3.amazonaws.com/i/d5eviwckwle2w52g11p9.PNG)

In CSS Battle we have to replicate a target layout with the smallest possible code and we can compete against other players to get the highest score on the leaderboard.

![CSSBattle](https://thepracticaldev.s3.amazonaws.com/i/o8fpgab1mq6146vmf24b.PNG)

**Free** [Let's play](https://cssbattle.dev/)
:point_right: Thanks @ Nick Taylor for suggesting it in the comments!
&nbsp;

---------------------------------------
&nbsp;

# Flexbox Layout
&nbsp;

###Flexbox froggy

![flexboxfroggy](https://thepracticaldev.s3.amazonaws.com/i/qfru7wnt8vze8f83yk95.png)

Help Froggy and friends by writing CSS code!

> Flexbox Froggy takes inspiration from the classic arcade game Frogger, and web literacy games like the brilliant CSS Diner and Erase All Kittens, where you learn about CSS selectors and HTML markup respectively.

We must bring the frogs home to their lilypads by using CSS flexbox instructions. We need to control alignment, spacing, and wrapping of elements on the webpage to achieve our goal.
**Free** [Let's play](https://flexboxfroggy.com/)
&nbsp;


###Flexbox defense

![flexboxdefense](https://thepracticaldev.s3.amazonaws.com/i/37cblhul8f2skfkyyhby.png)

Flexbox defense is based on the classic tower defence games, but to place our items we write CSS instructions. We use the justify-content property on the main container to move the single towers into effective positions. 
**Free** [Let's play](http://www.flexboxdefense.com/)
&nbsp;


###Flexbox zombies
![flexboxzombies](https://thepracticaldev.s3.amazonaws.com/i/zeclqc7h1waz96knkdge.png)

Also this game has been designed by Dave Geddes (as Gridcritters above). Here we use Flexbox to position the hero's crossbow and hit the zombies and survive along the game.

Have a look at the video below used by Dave for the game launch. Also in this case the graphics and the story are really amazing!

{% twitter 859047278895521792 %}

> Each section unravels part of the plot, gives you expertise over a new flexbox concept, and presents zombie survival challenges that force you to solidify your new skills like your life depends on it.

**Free** [Let's play](https://flexboxzombies.com/p/flexbox-zombies)
&nbsp;

---------------------------------------
&nbsp;

Do you know other CSS/Design games?
Write it in the comments below and I will add them to the above list.

![](https://media.giphy.com/media/Js7cqIkpxFy0bILFFA/giphy.gif)

&nbsp;


# Useful references

Below a collection of resources we can access if we need to learn from the basics or simply to have a look from time to time for a reference.
&nbsp;


### CSS Selectors

An overview about all [Css selectors](https://www.w3schools.com/cssref/css_selectors.asp) and how to apply them.
&nbsp;


### Grid CSS

![gridbyexample](https://thepracticaldev.s3.amazonaws.com/i/3thipbiuic5olwjuqs67.png)

A [comprehensive collection](https://gridbyexample.com/learn/) of resources (videos and examples) to learn CSS Grid Layout.
&nbsp;


### Flexbox Layout 

![css-tricks](https://thepracticaldev.s3.amazonaws.com/i/6nkl5kfueli7s99y00fh.png)

A visual guide to CSS flexbox layout (one of the best in my opinion). The guide focuses on all the different possible properties for the parent element (the flex container) and the child elements (the flex items).
[Link](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)