I’m having this problem while doing the project “my web site style guide”, I need to create 4 squares, same size but different color, one next to each other. I thought about using the code below, because I wanted to set the size one time and only put color in each one:
<section class="squarecolor"> <div class="colorone"></div> <div class="colortwo"></div> <div class="color3"></div> <div class="color4"></div> </section>
background-color: yellow; }
background-color: #9a3207; }
background-color: green; }
The problem is that either the color nor the seize appear with the .squarecolor, but if I put seize and color in colorone or colortwo, it appear. I prefer to nor repeat the size 4 times, but I don’t know how to fix it.
If you know, I would appreciate your help.