해결됨
Changing order of results to fit images into available space
Hi all,
How would I go about outputting images stored in a database in a grid when images will be in various sizes and will be added in any order? All images will either be 100 x 50 or 300 x 50 and the display area will be 400 wide. What I need is for a way of CF to recognise that the if 2 images in a row are 300 wide, followed by 2 images at 100 wide, it should slot one of the 100 wide images after each of the 300 wide images.
So if the actual order of images stored was:
300x50
300x50
100x50
100x50
100x50
300x50
it should display them in an order to fill in the gaps left by the larger images, e.g.
300x50
100x50
300x50
100x50
100x50
300x50
Is this possible with CF? If not, how else is it achievable?
Many thanks in advance.
Paul
How would I go about outputting images stored in a database in a grid when images will be in various sizes and will be added in any order? All images will either be 100 x 50 or 300 x 50 and the display area will be 400 wide. What I need is for a way of CF to recognise that the if 2 images in a row are 300 wide, followed by 2 images at 100 wide, it should slot one of the 100 wide images after each of the 300 wide images.
So if the actual order of images stored was:
300x50
300x50
100x50
100x50
100x50
300x50
it should display them in an order to fill in the gaps left by the larger images, e.g.
300x50
100x50
300x50
100x50
100x50
300x50
Is this possible with CF? If not, how else is it achievable?
Many thanks in advance.
Paul
