The code that I wrote is supposed to be 270px wide and the fact that it works properly supports that.
I suggest that you increase the width of whatever box you are putting it into by 4px. That would be much easier than taking away 4px from the array of boxes.
But you have a wrapper with a margin of 27px on either side, making a total of 54px. So that’s not all going to fit in the box. The easiest fix would be to change the 27px margins to 25px.
There is 2px margin on either side of each square. That means you have to remember to count 2px at each of the outer edges. That’s where the extra 4px comes from.
No, they are not identical. The code is different.
The visible width is the same so they look identical, but mine does not spread out as the font size increases whereas the other does. Which do you prefer?