So, I have this small bit of code that generates rows and columns of boxes with space in-between them.
It seems to work fine; however when I set the height and width of the boxes to 32 pixels and the space in-between them to 8 pixels, there are gaps that start to appear where boxes should be.
If I use just about any other numbers they work, but of course I had my mind set on 32 and 8.
I am wondering if it's the method in which I am looping through creating the boxes or if there's some underlying math going on that I don't understand.
Here's a jsFiddle set up with the code in question:
http://jsfiddle.net/dondon/zMnuK/
If you modify the 'spacing' in the JS section to say 7 or 9, the gaps vanish. What is it about 8 (or 4) that cause the gaps to appear?
Any input is appreciated! :)