I have a set of images that I want to display on a web site. This web site is composed of cells. Each cell is the same size and there are a specific number of rows and columns.
I will have image names loaded in a database that I want to display on the fly. But here is the problem. Each image may not be 1 cell. It may be a 2x2 cell image (4 cells) or it may be a 4x1 (also 4 cells) or it may be any size. The only rule is that the images in the cells need to be next to each other.
To further explain:
I have a 10 row by 10 column grid, each numbered going across (so row 1 would be cells 1 to 10, row 2 would be cells 11 to 20, etc.)
I have 1 image in cell 1 that is 1 cell wide by 1 cell high.
I have 1 image in cells 2, 3, 11, 12, 13 (so it basiclly surounds the image in cell 1).
I have 1 image in cells 9 & 10 and 19 & 20 (a 2x2)
The other cells would be blank having no image loaded
How can I program this to display in the grid properly?
The database is pre-loaded with all cells accounted for so the looping can be done with the cfquery tag.