Well if you change to classes it will have to be reflected in both your html and css so they match.
When your doing a big experiment or a big change in your code you could do a number of things to keep what you have working already safe.
- See how the change effects one element first.
- Copy the line your going to edit and paste it above or below your code then comment it out.
That way you can revert to the old line easily.
- Fork your project and work on the fork if working on codepen or make a backup of files manually if working locally.
The div with your display class is responsible for making that yellow rectangle.
The for loops in your JS spits out your output and you want to spit out a bunch of yellow rectangles you need that html to be appended in your for loop just like th
<li> tag is.
I didn’t edit much but try to figure it out before looking:
Spoiler: Codepen link to the edit from the img above.