Dynamic Photo Gallery

Discussion in 'Programming' started by igarcia, Sep 5, 2007.

  1. #1
    I've got a database table setup with 10 files names and have them being inserted into a table and displaying the images. When i click on the image it loads that full size into my container. now i would like my tumbnails to be interted in columns of 4 left to right for example

    x x x x

    x x x x

    x x

    instead of all of them in one column, how would i go about doing this? and even if i had 100 thumbnails i'd like 4 columns across by however many rows needed down.
     
    igarcia, Sep 5, 2007 IP
  2. cfStarlight

    cfStarlight Peon

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use MOD

    
    <table>
    <tr>
    <cfoutput query="yourQuery">
    	<td>#TheColumnName#</td>
    	<cfif currentRow mod 4 eq 0></tr><tr></cfif>
    </cfoutput>
    </tr>
    </table>
    
    Code (markup):
     
    cfStarlight, Sep 5, 2007 IP