DEV Community

Cover image for CSS Battle: #2 - Carrom
Jatin Sharma
Jatin Sharma

Posted on • Originally published at

CSS Battle: #2 - Carrom

In this article, I will solve a Carrom CSS Challenge on CSS Battle. Let's look at the problem first.


We need to create the following container by using CSS Properties only:
Simply Square


So now look at the Solution and how we are going to achieve this.


First, create an HTML for this, I've used the two containers to do that. you can use Pseudo-classes as well.

<div class="box">
Enter fullscreen mode Exit fullscreen mode


Now let's style the containers.

body {
  margin: 0;
.box {
  display: flex;
  flex-wrap: wrap;
  column-gap: 100px;
  background: #62374e;
.box span {
  width: 50px;
  height: 50px;
  background: #fdc57b;
  align-self: center;
  margin: 50px;
Enter fullscreen mode Exit fullscreen mode

Quick Links

Note: Codepen might be different from the real shape but the code is correct with 100% match.

Wrapping up

If you like this then don't forget to ❤️ it. And I'll see you in the next article. See you soon.

Top comments (2)

codewithayan10 profile image
Code with Ayan

Super duper impressive

j471n profile image
Jatin Sharma

Thanks Ayan :)