Chapter 5: How I Built a Pure CSS Crossword Puzzle
by Adrian Roworth
Recently I created a pure CSS crossword puzzle implemented using CSS grid that does not need JavaScript in order to work. It gained heavy interest pretty quickly on CodePen. As of this writing, it has more than 350 hearts and 24,000+ page views!
The great CSS Grid Garden tutorial inspired me to build something with Grid Layout features. I wondered if these features could be put to good use in building a crossword puzzle — then I thought, let’s try to create the whole thing without using JavaScript.
Building the Board/Grid
So, first thing’s first, let’s create the board itself!
I ended up with the following basic structure, with HTML comments included to show what the different ...
Get Designing with CSS Grid Layout now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.