I would like to create a grid on my page made up of tiny, tiny boxes – (say, 2 pixels height and width, or 2×2). I had a few thoughts on how to go about this – all of which failed in one way or another:
- PHP using the echo statemenet
- Javascript – my best option so far
- Manually construct the grid to fit a 800 x 800 space (would take WAY too long).
Unfortunately, even my best option was quite slow. Does anyone have a better plan for how I could create a grid made up of tiny squares in an efficient manner?
This works for me (grid.gif is 3×3 with border, see http://stuff.drnet.at/stackoverflow/grid/ for working version):
Tested with FF & Chrome (both on Ubuntu Lucid) only, but idea should work.